From: Antony R. <ri...@to...> - 2003-04-10 23:26:18
|
Having had no success all day, I decided to try and use something previously unknown to me - batch files. Batch files are quite scary - in terms of their simplicity and power. I came up with the following batch code that would run my sample java class passing various system properties using the syntax specified by Pepijn. ... and it seems to work on all my home computers!! I'll have to wait until tomorrow to test on works systems, but don't see there being a problem at all. A quick google search for "creating batch files" should provide you with an abundance of information on how batch classes work (which was my main problem). I found this site to be quite good: http://home.att.net/~gobruen/progs/dos_batch/dos_batch.html Find below my sample batch code (setting the "java.ext.dirs" property in this example): @echo on rem rem Determine if JAVA_HOME is set and if so then use it rem if not "%JAVA_HOME%"=="" goto found_java set RIBOTSIM_JAVACMD=java goto file_locate :found_java set RIBOTSIM_JAVACMD=%JAVA_HOME%\bin\java :file_locate rem %~dp0 is name of current script under NT set RIBOTSIM_HOME=%~dp0 rem : operator works similar to make : operator set RIBOTSIM_HOME=%RIBOTSIM_HOME:\bin\=% rem attempting to run the main java command, passing in system properties "%RIBOTSIM_JAVACMD%" -cp e:\ "-Djava.ext.dirs=%RIBOTSIM_HOME%\libs" GLTest %1 %2 %3 %4 %5 %6 %7 %8 %9 :end ribot ----- Original Message ----- From: "Pepijn Van Eeckhoudt" <pep...@lu...> To: <gl4...@li...> Sent: Thursday, April 10, 2003 11:58 PM Subject: Re: [gl4java-usergroup] Packing GL4Java with a program What do you mean by this registry key? As far as I know gl4java does not access the windows registry. What I meant by specifying the system property is this: java -Djava.library.path=<some path> YourApplication This setup works fine for me on every machine I've tested on. The only limitation is that you can't do this when you are running your application as an applet or via webstart. (Both are possible but require some more effort) Pepijn |