I need to perform ping to some ip/machine. The code may be executed on any kind of platform (windows, linux, mac) and i need to get the information about loss and the round trip time.
so java’s exec of ping is not good enough because then i need to parse ping response as string, which is different per platform and per OS language.
so what do i need to do? I know there is something like JNI, but i’m new to java, so need a little help here.
it still means i need to have native implementation per platform?
Any examples or suggestions?
I need to perform ping to some ip/machine. The code may be executed on
Share
I have used JNI to get the ping command.
I have implemented the ping using native (C) and then wrapped it with JNI.
The downgrade is that need to compile the C dll per platform.