• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to know that a remote server is working or not  RSS feed

 
ashwinpatil patil
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all i want to know that a machine is up(start) or not(down) form a remote machine using RMI.
AND also i want to know that how to show that whwther the application is running or not in windows task manager.
how to change a jave.exe file to say myname.exe
 
Chris De Vries
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A machine that is down will result in a RemoteException being thrown at some point by the RMI client. Of course that doesn't necessarily mean the computer is down, it could just be unreachable, or the rmiregistry could be stopped, or the RMI server program could be stopped.
To start a java program such that it shows up with a name that is not java.exe on the windows task manager you can compile a program which loads the jvm and statically executes some java code using JNI. You can follow this example to invoke a JVM using JNI.
The above link is not completely up to date. Also be sure the check the JNI docs for the version of the jdk you are using. For example for 1.4.2 see these JNI docs.
[ October 01, 2003: Message edited by: Chris De Vries ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!