I’ve a java file in a shared folder which has to be executed. I tried using the following for execution
set JAVA_HOME=\\[servername]\[sharedfolder]\j2sdk\jdk1.5.0_04
set CLASSPATH= "the directory with the classes"
%JAVA_HOME%/bin/javaw -cp "%CLASSPATH%" [name of the class with the main method]
but when i gave javac , it says that javac is not a recognizable command or argument. Is there any other way of executing java files in shared folder?
Thank you for your help in advance.
Given that Tom gave a UNC style path, and used a Microsoft Windows environment variable expansion, here is an example that works for Windows.
You could map the share to a drive letter and then set your
JAVA_HOMEvariable to that.For example: