The Source for Java Technology Collaboration

Home » java.net Forums » Java Tools » Java Development Tools

Thread: Running Java from a shared folder.

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 2 - Last Post: Sep 7, 2006 7:23 AM by: joeys
doc_imaging

Posts: 1
Running Java from a shared folder.
Posted: Sep 6, 2006 7:05 PM
  Click to reply to this thread Reply

How do you run JAVA from a client station off a shared folder on a Windows server? I know it can be done, so you do not need to install Java on the client stations. The Java application runs fine on the server. I tried running it on the shared server folder, on a client station and I get this message: 'java' is not recognized as an internal or external command,operable program or batch file. Does anyone know what my problem is?

klopperq

Posts: 14
Re: Running Java from a shared folder.
Posted: Sep 7, 2006 5:39 AM   in response to: doc_imaging
  Click to reply to this thread Reply

The error that you got would probably indicate that the file java.exe is not on your PATH.

Not sure if this will work (as in I have not actually tried it), but have you tried setting the JAVA_HOME environment variable explicitly. You should also put the bin directory inside JAVA_HOME on your PATH (so you can find java.exe).

I realize that having to do settings on the client PC may be exactly what you are trying to avoid......


Message was edited by: klopperq


joeys

Posts: 5
Re: Running Java from a shared folder.
Posted: Sep 7, 2006 7:23 AM   in response to: doc_imaging
  Click to reply to this thread Reply

This is something we do in our production environment for all of our java applications. It provides an easy way to deploy java application without installing java on any computer other than a shared server.

Here is an example of a bat file for executing the application. There are many different ways of doing this so experiment to see what works for you.

set JAVA_HOME=\\[servername]\[sharedfolder]\j2sdk\jdk1.5.0_04
set CLASSPATH= "the jar file or the directory with the classes"
%JAVA_HOME%/bin/javaw -cp "%CLASSPATH%" [the fully qualified name of the class with the main method]




 XML java.net RSS