PDA

View Full Version : launchers for java jar files (what version of java is it?)



kherman
06-04-2003, 08:51 AM
I have a good question. I am creating an instller for Windows which is for a java application.

The java files are packed into a jar file.

When I use the install wizard, I can create a launcher for the jar files. Upon doing so, I have to select what java version I want. I want 1.4.1. Unforuntately, I can only select 1.4 and I have no idea what version under 1.4 I am getting(1.4.0 or 1.4.1). Does anyone know what is going on under the hood?

brianl
06-04-2003, 09:24 AM
If you are using ISMP 5.0 or higher, you should use the "Java 1.4.1 by Sun Microsystems" JVM search instruction for either your JVM Resolution, your Win32 launcher, or both. This will select only 1.4.1 JVMs, and not 1.4.0.

If you are using a previous version you'll need to create a custom JVM Search Instruction. See the documentation.

kherman
06-04-2003, 10:12 AM
Thanks Brian, I think you put me on the right path.


Originally posted by brianl
If you are using ISMP 5.0 or higher, you should use the "Java 1.4.1 by Sun Microsystems" JVM search instruction for either your JVM Resolution, your Win32 launcher, or both. This will select only 1.4.1 JVMs, and not 1.4.0.

If you are using a previous version you'll need to create a custom JVM Search Instruction. See the documentation.

kherman
06-04-2003, 10:37 AM
Actually, I just talked to some co-workers.

I need to use JRE 1.4.1_01. How can I do this? Is there an easy way to package this all together?

brianl
06-04-2003, 10:50 AM
The best way to guarantee that your app installs with a particular JVM is to bundle that particular JVM with the installer, and to not search the end-user's system for a JVM. This will result in a higher overhead for your installation, but it provides the easiest way to deploy your application with a specific JVM. To do this, bundle the 1.4.1_01 JVM with the Win32 distribution launcher (under the Build tab), and do not specify any JVM Search Instructions. For the Uninstaller JVM Resolution (under the Product tab), set "Use Current JVM" under Windows properties to True, and do not specify a bundled JVM or search instructions. This scenario will result in the bundled 1.4.1_01 JVM to be installed with your application, and your application will be set up to use it.

kherman
06-04-2003, 12:29 PM
Just a quick summary. I'm, about to test the install program based on the changes you gave me.

I am installing ABC into c:\Program Files\ABC

JRE 1.4.1_01 should install itself into C:\Program Files\ABC\JRE (or similar)

The launcher executable(ABClauncher.exe) that multi-platform creates will launch ABC.jar using the JRE in C:\Program Files\ABC\JRE therefore 1.4.1_01 will be the version of hte JRM being used.

Is this correct?

Thanks again!
Karl

kherman
06-04-2003, 12:32 PM
Is this what I am suppose to bundle?:

http://java.sun.com/products/archive/j2se/1.4.1_01/index.html

If not, could you please point me to the correct download.

Thank you,
Karl

brianl
06-04-2003, 12:59 PM
No. Actually, you need to download from here (http://www.installshield.com/downloads/default.asp?pm=mpf&pver=All&gv=1&msxmlhidden=y&mt=jvm&Language=English&platform=Windows&mode=submit&x=28&y=16):

http://www.installshield.com/downloads/default.asp?pm=mpf&pver=All&gv=1&msxmlhidden=y&mt=jvm&Language=English&platform=Windows&mode=submit&x=28&y=16

kherman
06-04-2003, 01:02 PM
THANK YOU!!!

Your help is being invaluable.


Originally posted by brianl
No. Actually, you need to download from here (http://www.installshield.com/downloads/default.asp?pm=mpf&pver=All&gv=1&msxmlhidden=y&mt=jvm&Language=English&platform=Windows&mode=submit&x=28&y=16):

http://www.installshield.com/downloads/default.asp?pm=mpf&pver=All&gv=1&msxmlhidden=y&mt=jvm&Language=English&platform=Windows&mode=submit&x=28&y=16

kherman
06-04-2003, 01:08 PM
OK, one more question.

Do I need to put the exe into the jvms subdirectory where ismp was installed?

brianl
06-04-2003, 01:21 PM
Karl,

Yes, the .exe file that you download should be put into the \jvms\win32 subdirectory of your ISMP installation directory (although it is also possible to put this file elsewhere and browse to it in your project).

In answer to your previous question, if ABClauncher.exe is a launcher created by a Launcher bean under your Product tab, then it will be configured to use the 1.4.1_01 to launch ABC.jar as long as the "JVM ID" properties of the Launcher bean and the Uninstaller JVM Resolution bean agree. This value is "jvm" by default, and it is OK to leave it as the default.

kherman
06-04-2003, 02:38 PM
OK, OK ... on e more question ;)

I got it installing perfectly. I am extremely happy about that.

There is one little thing though. During the install, I get an error that states that I am about to copy over the JVM folder with a new install. It appears as though the JVM is getting installed twice during one install (somehow). I am packing a JVM into the project for installShield's own use and I think it's unpacking a second copy to the same directory for use by the ABClauncher.exe program. Is there a way around this?

Thanks again,
Karl