This site requires JavaScript, please enable it in your browser!
Greenfoot back
JDNelson
JDNelson wrote ...

2013/6/14

Hi-tech question about JRE/JDK

JDNelson JDNelson

2013/6/14

#
Hi, I have developed a programme that I am running on my workplace network. Some of the machines are configured with a system JRE and others are not. I want to know if it is possible to target a remote JRE on, for example, a USB drive. I have used the standalone IDE and know how to connect to a JDK for compiler purposes. The problem is when I export my jar, it won't run/build on all of the machines. This is because there are different servers with different settings and one of them appears not to allow Java runtime. I have configured a Tomcat server to run on all the systems. It is possible to create a simple .bat file that tells Tomcat where the JRE is - but that is a feature of Tomcat. My question is: Can I change parameters in the bluej.defs and/or greenfoot.defs to connect to a JRE that is not the system JRE with respect of the system environment variables? If this is possible, are these definitions exported along with the jar file? If none of the above is correct/possible - is there another way to direct to a JRE?
davmac davmac

2013/6/14

#
You can change the bluej.windows.vm setting in bluej.defs to tell Greenfoot where to find the JDK. However, this has no effect on exported jar files. Basically, running a jar file requires that a JRE is correctly installed. If that's not the case there's really nothing that can be done. Your only option would be to wrap the jar file in an executable wrapper, using a tool such as jsmooth.
JDNelson JDNelson

2013/6/16

#
Thanks for the reply. I since discovered my original analysis was incorrect. I basically had used a third party library. One of the methods did not require an new instance of it's class to be instantiated. This class is obviously not in the system JRE. I had to put the third party jar in (my jre home)/lib/ext/ I have it sorted out now. Thanks again.
You need to login to post a reply.