Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Distributing Java Runtime


5 replies to this topic

Dave I

Dave I
  • Members
  • 195 posts

Posted 29 May 2001 - 11:20

I want to distribute Java Runtime with ISWI 2.03 but unfortunately there does not seem to be any Merge Module.

I have downloaded JRE 1.3.1 from the SUN website.  The "J2RE-1_3_1-win-i.exe" seems to be packaged with Installshield?

At the moment the only way I can see to ship the Java Runtime is to add the Java Install to the distribution CD and call the file with a Custom Action.  

The idea of calling a black-box.exe in a Windows Installer package seems to contradict the Windows Installer policy?

Any help, would be greatly appreciated...
Thanks,
Dave.  


Davin

Davin
  • Members
  • 7 posts

Posted 08 June 2001 - 20:08

Hi, Dave.
Initially, I had included the Java Installer (Wise?) from Sun and it made things messy. I was surprised there was not a silent install method for their JRE.

I decided to copy all the installed files required locally into a JRE subfolder of my application. I did not want to be responsible for upgrading the user's machine without their consent. I also made sure all of the shortcuts were pointing to my copy of the JRE. BTW - For some strange reason, I had to create a CA that just called an empty Java.exe (I used javaw.exe to remain quiet) to boot up my installed JRE after it was installed. Weird...

By installing your own JRE, you are guaranteed not to hamper other applications that rely on the older versions. As we both know, Java is not 100% reverse compatible with earlier versions.

The JRE does not rely on any data in the registry or the System folders. It just uses a bunch of files in sorted folders. Pay attention to the structure of the folders.

I realize this is the hard way of doing it but, after the grunt work, it's the safest and easiest way to distribute the JRE.

Just my opinions.
Best wishes and good luck.


suvidha

suvidha
  • Members
  • 72 posts

Posted 09 June 2001 - 17:17

In our application, we are NOT installing JRE but checking if JRE1.3.1 is aleady present on system. If yes then installation of our application completes otherwise it is aborted.

So, in the shortcut that my installer creates, I am targetting to [systemfolder]\ javaw.exe and then giving  our application as parameter to it.

ie
Target:            [systemfolder]\javaw.exe
Argument:      -jar  ourapp.jar

it is working fine.
I am relying on fact that whenever JRE is installed, a copy of javaw.exe is installed in system folder (windows/winnt \system32 directory).

(no matter where the user choose to install JRE).
I have tested on some windows OS.

But can you confirm it.

If you think otherwise then please let me know as to what is made as TARGET for the shortcuts (on Desktop or StartMenu) to you application.



suvidha

suvidha
  • Members
  • 72 posts

Posted 09 June 2001 - 17:21

In our application, we are NOT installing JRE but checking if JRE1.3.1 is aleady present on system. If yes then installation of our application completes otherwise it is aborted.

So, in the shortcut that my installer creates, I am targetting to [systemfolder]\ javaw.exe and then giving  our application as parameter to it.

ie
Target:            [systemfolder]\javaw.exe
Argument:      -jar  ourapp.jar

it is working fine.
I am relying on fact that whenever JRE is installed, a copy of javaw.exe is installed in system folder (windows/winnt \system32 directory).

(no matter where the user choose to install JRE).
I have tested on some windows OS.

But can you confirm it.

If you think otherwise then please let me know as to what is made as TARGET for the shortcuts (on Desktop or StartMenu) to you application.



Davin

Davin
  • Members
  • 7 posts

Posted 26 July 2001 - 16:11

Hello, suvidha.

Two questions...
1. How are you determining what version of the JRE is currently installed (older or newer)?

2. How can you guarantee that the user doesn't uninstall/upgrade/degrade the JRE?

3. If the user requires JRE 1.2 for legacy Java applications currently installed, are you requiring the user of your software to upgrade their JRE to 1.3.1? What about when the user upgrades to 1.4?

Just wondering how you are handling these events. It seems to me that it is a lot to ask of the user to conform their machine's JRE installation to your application.

I was impressed by your comments about the runtime executables residing in the SYSTEM folder. I didn't know about this.

Thank you.