Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
mandy roberts wrote:This code below is from what i have found on the net...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Greg Brannon wrote:No need to SHOUT. In fact, SHOUTING may scare people away.
You've shown us what you found on the net, but what have you tried in the last week and what were the results? If you had errors or undesirable results, please post those.
Tushar Kapila wrote:you want to run an independent jvm or dynamically load some clases from jar to existing jvm (that is running applet) ?
if independent jvm - just point the exe to java.exe and pass parameters - class-path, main class name etc
but you will need to sign applet if running on others systems as Runtime is a special permission.
For dynamically loading classes you will need the URL to the jar, see URL class loader and you will need parameters to the main class and method to invoke (via reflection)
Paul Clapham wrote:To run a JAR file, you're going to need to have a Java runtime installed on the machine where the applet is running. Of course since the applet is running, that means that there is in fact a Java runtime installed. So on to the next step: to run a JAR, the command is something like
java -jar your.jar
So that would be the command you'd have to run ("str5" in your applet code). However you can run into several problems there: for example you don't know whether "java" is actually in the user's PATH environment variable, so you might have to use the full path to the java.exe executable instead of just "java". And I'm sure there are other problems, you're just going to have to experiment on a variety of systems to make sure you get that all right.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |