From: Montana, P. M <pat...@lm...> - 2003-04-09 15:41:37
|
Gary, (BTW, I am assuming a Windows OS for this discussion.) We distribute our program with GL4Java. However, we also provide the SDK, Java3D, JAI, and some various comm packages. Our approach was to install the SDK on our development machines, then we installed Java3D and JAI within that SDK (using the standard installers). Next, we copied the relevant GL4Java jar files to: j2sdk/jre/lib/ext This way the JVM can find the jar files automatically when it runs (any program, not just ours). Then we copy the GL4Java .dll's into the bin directory for our application (where we have the batch file that launches our application). You could also copy the .dll's to the j2sdk/bin directory. The point is, those dll's have to be in the directory that you run from, or they must be in a directory that is set in your PATH environment variable. If you want to copy stuff into people's System32 directory, then it is automatically in their PATH variable. And don't forget to include the appropriate license files, readme files, and other documentation required by the software providers. Then we include our entire SDK with our application using InstallShield. The installation is a simple "Next, Next, Next" operation for the user. Then they have an icon on their desktop (and an entry in the Start menu) to launch our program with no troubles. Hope that helps. -Mark Gary Stewart wrote: Assuming you can roughly predict that someone is using a given setup is it possible to pack GL4Java with a program? Looking at it you need the .dll (or .so) that matches the java version (1.4 in this case) and the GL4Java jar files. From that is it possible just to provide the .dll and jars in a zip with the program and someone launching your program will hopefully have it running *if* the enviroment and class path reference "." and the jar files are in the class path (for example if you use another jar with extensions). Many thanks, Gary ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf <http://thinkgeek.com/sf> _______________________________________________ gl4java-usergroup mailing list gl4...@li... https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup <https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup> |
From: Antony R. <ri...@to...> - 2003-04-09 16:05:00
|
[also assuming Windows OS] I realise that the dll files need to be in the same folder that the application is run from (either custom bin folder, System32, j2sdk/bin, or anywhere else on your PATH environment variable). So if I want to package the entire application (dlls, application classes, gl4java jars) up into a single executable jar file, what kind of amendments would I have to make to the standard manifest to tell the application to look for specific dll files included within jar? Would I still need to create a bin folder to place the dll files in? Maybe everyone on the list can work together to produce a HelloWorld sample package? I'd be happy to host the files for everyone. Let me know what you think. ribot. ----- Original Message ----- From: "Montana, Patrick M" <pat...@lm...> To: "Gary Stewart" <gi...@st...>; <gl4...@li...> Sent: Wednesday, April 09, 2003 4:40 PM Subject: Re: [gl4java-usergroup] Packing GL4Java with a program > Gary, > > (BTW, I am assuming a Windows OS for this discussion.) > > > We distribute our program with GL4Java. However, we also provide the SDK, > Java3D, JAI, and some various comm packages. Our approach was to install the > SDK on our development machines, then we installed Java3D and JAI within > that SDK (using the standard installers). Next, we copied the relevant > GL4Java jar files to: > j2sdk/jre/lib/ext > > > This way the JVM can find the jar files automatically when it runs (any > program, not just ours). Then we copy the GL4Java .dll's into the bin > directory for our application (where we have the batch file that launches > our application). You could also copy the .dll's to the j2sdk/bin directory. > The point is, those dll's have to be in the directory that you run from, or > they must be in a directory that is set in your PATH environment variable. > If you want to copy stuff into people's System32 directory, then it is > automatically in their PATH variable. > > > And don't forget to include the appropriate license files, readme files, and > other documentation required by the software providers. > > > Then we include our entire SDK with our application using InstallShield. The > installation is a simple "Next, Next, Next" operation for the user. Then > they have an icon on their desktop (and an entry in the Start menu) to > launch our program with no troubles. > > > Hope that helps. > -Mark > > > > > Gary Stewart wrote: > > > Assuming you can roughly predict that someone is using a given setup is it > possible to pack GL4Java with a program? Looking at it you need the .dll (or > > .so) that matches the java version (1.4 in this case) and the GL4Java jar > files. > From that is it possible just to provide the .dll and jars in a zip with the > > program and someone launching your program will hopefully have it running > *if* > the enviroment and class path reference "." and the jar files are in the > class > path (for example if you use another jar with extensions). > > > Many thanks, > > > Gary > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf <http://thinkgeek.com/sf> > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > <https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup> > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup |
From: Pepijn V. E. <pep...@lu...> - 2003-04-09 18:49:28
|
We have solved this problem by simply adding the jars to the classpath and defining the java.library.path system property. If you don't set this property manually it is set to the system path (on windows at least). In our application for instance we set this property to ./lib/native. This doesn't mess up the loading of the jdks own dlls because the path to these is defined in a property called sub.boot.library.path (or something like that). Hope this helps. Pepijn Van Eeckhoudt On woensdag, apr 9, 2003, at 18:04 Europe/Brussels, Antony Ribot wrote: > [also assuming Windows OS] > > I realise that the dll files need to be in the same folder that the > application is run from (either custom bin folder, System32, > j2sdk/bin, or > anywhere else on your PATH environment variable). > > So if I want to package the entire application (dlls, application > classes, > gl4java jars) up into a single executable jar file, what kind of > amendments > would I have to make to the standard manifest to tell the application > to > look for specific dll files included within jar? Would I still need to > create a bin folder to place the dll files in? > > Maybe everyone on the list can work together to produce a HelloWorld > sample > package? I'd be happy to host the files for everyone. > > Let me know what you think. > > ribot. > ----- Original Message ----- > From: "Montana, Patrick M" <pat...@lm...> > To: "Gary Stewart" <gi...@st...>; > <gl4...@li...> > Sent: Wednesday, April 09, 2003 4:40 PM > Subject: Re: [gl4java-usergroup] Packing GL4Java with a program > > >> Gary, >> >> (BTW, I am assuming a Windows OS for this discussion.) >> >> >> We distribute our program with GL4Java. However, we also provide the >> SDK, >> Java3D, JAI, and some various comm packages. Our approach was to >> install > the >> SDK on our development machines, then we installed Java3D and JAI >> within >> that SDK (using the standard installers). Next, we copied the relevant >> GL4Java jar files to: >> j2sdk/jre/lib/ext >> >> >> This way the JVM can find the jar files automatically when it runs >> (any >> program, not just ours). Then we copy the GL4Java .dll's into the bin >> directory for our application (where we have the batch file that >> launches >> our application). You could also copy the .dll's to the j2sdk/bin > directory. >> The point is, those dll's have to be in the directory that you run >> from, > or >> they must be in a directory that is set in your PATH environment >> variable. >> If you want to copy stuff into people's System32 directory, then it is >> automatically in their PATH variable. >> >> >> And don't forget to include the appropriate license files, readme >> files, > and >> other documentation required by the software providers. >> >> >> Then we include our entire SDK with our application using >> InstallShield. > The >> installation is a simple "Next, Next, Next" operation for the user. >> Then >> they have an icon on their desktop (and an entry in the Start menu) to >> launch our program with no troubles. >> >> >> Hope that helps. >> -Mark >> >> >> >> >> Gary Stewart wrote: >> >> >> Assuming you can roughly predict that someone is using a given setup >> is it >> possible to pack GL4Java with a program? Looking at it you need the >> .dll > (or >> >> .so) that matches the java version (1.4 in this case) and the GL4Java >> jar >> files. >> From that is it possible just to provide the .dll and jars in a zip >> with > the >> >> program and someone launching your program will hopefully have it >> running >> *if* >> the enviroment and class path reference "." and the jar files are in >> the >> class >> path (for example if you use another jar with extensions). >> >> >> Many thanks, >> >> >> Gary >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by:ThinkGeek >> Welcome to geek heaven. >> http://thinkgeek.com/sf <http://thinkgeek.com/sf> >> _______________________________________________ >> gl4java-usergroup mailing list >> gl4...@li... >> https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup >> <https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup> >> >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: Etnus, makers of TotalView, The > debugger >> for complex code. Debugging C/C++ programs can leave you feeling lost >> and >> disoriented. TotalView can help you find your way. Available on major >> UNIX >> and Linux platforms. Try it free. www.etnus.com >> _______________________________________________ >> gl4java-usergroup mailing list >> gl4...@li... >> https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The > debugger > for complex code. Debugging C/C++ programs can leave you feeling lost > and > disoriented. TotalView can help you find your way. Available on major > UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > |
From: Antony R. <ri...@to...> - 2003-04-09 20:37:58
|
Thanks for the info Pepijn! I didn't even think about setting system properties. :) I'll try this method tomorrow morning. ribot. ----- Original Message ----- From: "Pepijn Van Eeckhoudt" <pep...@lu...> To: <gl4...@li...> Sent: Wednesday, April 09, 2003 7:49 PM Subject: Re: [gl4java-usergroup] Packing GL4Java with a program We have solved this problem by simply adding the jars to the classpath and defining the java.library.path system property. If you don't set this property manually it is set to the system path (on windows at least). In our application for instance we set this property to ./lib/native. This doesn't mess up the loading of the jdks own dlls because the path to these is defined in a property called sub.boot.library.path (or something like that). Hope this helps. |
From: Gary S. <gi...@st...> - 2003-04-10 16:00:36
|
I'd like to thank everyone for their help. I thought it should work and it has on a most of the configurations I've tried. One or two have had problems, I'm not quite sure with one (though it was a configuration at work so it is probably borked) and as far as I can see GL4Java requires a key placed in the registery (in Windows), which a second config didn't have the privlages to do. Thanks again, Gary |
From: Antony R. <ri...@to...> - 2003-04-10 18:09:26
Attachments:
GLTest.java
GLApp.java
|
I too have been testing on a number of machines today... I have created a main class - GLTest, which tries to set various system properties (see attachments). If these properties were set successfully, the GLApp class (which imports gl4java.GLContext) should then run without error. I have been testing on machines with access only allowed to the secondary D hard drive and have been unable to get this simple test program to work on any of these types of machine. So, does this mean that no access to the main OS drive means that you are not allowed to set properties?? It would be a shame if it was so. Any help on this matter would be very much appreciated. ribot. ----- Original Message ----- From: "Gary Stewart" <gi...@st...> To: <gl4...@li...> Sent: Thursday, April 10, 2003 5:00 PM Subject: Re: [gl4java-usergroup] Packing GL4Java with a program > I'd like to thank everyone for their help. I thought it should work and it > has on a most of the configurations I've tried. One or two have had > problems, I'm not quite sure with one (though it was a configuration at > work so it is probably borked) and as far as I can see GL4Java requires > a key placed in the registery (in Windows), which a second config didn't > have the privlages to do. > > Thanks again, > > Gary > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup |
From: Pepijn V. E. <pep...@lu...> - 2003-04-10 22:59:01
|
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 On donderdag, apr 10, 2003, at 18:00 Europe/Brussels, Gary Stewart wrote: > I'd like to thank everyone for their help. I thought it should work > and it > has on a most of the configurations I've tried. One or two have had > problems, I'm not quite sure with one (though it was a configuration at > work so it is probably borked) and as far as I can see GL4Java requires > a key placed in the registery (in Windows), which a second config > didn't > have the privlages to do. > > Thanks again, > > Gary > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The > debugger > for complex code. Debugging C/C++ programs can leave you feeling lost > and > disoriented. TotalView can help you find your way. Available on major > UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > |
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 |