How do I add files /lib and /bin in all installed JRE - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Guest

How do I add files /lib and /bin in all installed JRE

Hi,

We have written a Java program that uses the Sun classes to access a standard RS232 serial port.

To install this support, one must add the following files:

C:\Program Files\Java\jdk1.5.0_01\bin\win32com.dll
C:\Program Files\Java\jdk1.5.0_01\lib\javax.comm.properties
C:\Program Files\Java\jdk1.5.0_01\lib\comm.jar

My machine also requires these three files in both versions of the JRE, as follows:

C:\Program Files\Java\jre1.5.0_01\bin\win32com.dll
C:\Program Files\Java\jre1.5.0_01\lib\javax.comm.properties
C:\Program Files\Java\jre1.5.0_01\lib\comm.jar

C:\Program Files\Java\jre1.5.0_02\bin\win32com.dll
C:\Program Files\Java\jre1.5.0_02\lib\javax.comm.properties
C:\Program Files\Java\jre1.5.0_02\lib\comm.jar

So - how do I add these files to bin\ and lib\ in all of the Java virtual machines or SDK's on the target machine?
Guest

I'd like to expand the previous question. There are 5 virtual Java machines on my laptop - j2re1.4.2_03, j2re1.4.2_04, jdk1.5.0_01, jre1.5.0_01, jre1.5.0_02. This wouldn't be unusual, as the Java machines like to update themselves.

How would I ensure that the required libraries are always present in the latest Java virtual machine that is in use (see above)? Could I somehow have them present in my install directory? That would make it a lot safer.
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

Installing the files in the \bin directories of the installed JREs is not a solution. The problem appears of course when a new JRE is installed (autoupdate) and does not have the files in the \bin folder.

A solution would be simply to choose a version of JRE that works well with your application. Specify this JRE in the "Java Product" page, on the preffered version option.

Then, to be sure that this version will be present on the target machine install it as a prerequisite.

The last step is to conduct a search for the registry value that stores the path to the java home dir. Use the resulting property to make a property based folder with the \bin and \lib subfolders. In those subfolders you will then install your files.

If you need further assistance we will provide more details.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
anaorec
Posts: 6
Joined: Fri Sep 29, 2006 12:12 pm

Adding files to \lib and \bin after installing JRE

Hi,

I have just installed free version of the Advanced Installer.
I have exactly the same problem as above, installing JRE and copying some files to /lib and /bin folder.

I managed to include JRE in the prerequisites window, thanks for the help Mike - if JRE not found, it is installed.

I have noticed that in Java Products JRE Version minimum and maximum values go upto 1.5. I would like 1.6 or higher JRE version? Is this available in Advanced Installer For Java?

I did not have much luck with copying files to bin and lib folders. Could someone give me a bit more info on how to:

"... conduct a search for the registry value that stores the path to the java home dir. Use the resulting property to make a property based folder with the \bin and \lib subfolders. In those subfolders you will then install your files"

Thanks a lot.

Regards,
Ana
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
I have noticed that in Java Products JRE Version minimum and maximum values go upto 1.5. I would like 1.6 or higher JRE version? Is this available in Advanced Installer For Java?
To install 1.6 version of JRE type 1.6 in the minimum field.
I did not have much luck with copying files to bin and lib folders. Could someone give me a bit more info on how to:
The information on where the JRE is installed is stored in the "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\1.5\JavaHome" registry value. In order to copy your files in the /bin folder you need to obtain this registry value. You can obtain it by creating a registry search in the "Search" page.

With the property of the search create a "Property Based" folder in the "Files and Folders" view and add your files to this folder.

Hope this helps.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
anaorec
Posts: 6
Joined: Fri Sep 29, 2006 12:12 pm

Registry search success, but JRE version problems

Thanks Gigi. :D

I have managed to do the registry search.

I typed
root: HKEY_LOCAL_MACHINE
key: SOFTWARE\JavaSoft\Java Runtime Environment\1.5
name: JavaHome

I have created Property Based folder in Files and Folders, then subfolder called lib and added my file there. Brill!!!

Hope you don't mind, but could you also help me with the JRE version settings.
At the moment I have jre1.5.0_06 Update 6 and jre1.5.0_08 Update 8 installed on my computer. Now, as far as I can tell both Update 6 and Update 8 are regarded as version 1.5 in the registry, yet in Java Products it does not seems to complain about 1.6 min and max version requirement. Really confused!

What I would like is to fix the version value in Prerequisites to Update 6.

Thanks.

Regards,
Ana
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
At the moment I have jre1.5.0_06 Update 6 and jre1.5.0_08 Update 8 installed on my computer. Now, as far as I can tell both Update 6 and Update 8 are regarded as version 1.5 in the registry, yet in Java Products it does not seems to complain about 1.6 min and max version requirement. Really confused!
If you want that your Java product to use 1.6 JRE version type 1.6 in the "JRE version, minimum" field from "Java Products" page. Also note that you can define a prefered list of JRE version that your product can use, click the "Preferred..." button.
What I would like is to fix the version value in Prerequisites to Update 6.
Here is an example on how to add JRE 1.5 Update 6 as prerequisite: Choose "Add->Java Runtime Environment". In the "Install Conditions" page type 1.5.0_06 in the minimum field.

Also please see this for more help about how to use prerequisites:
http://www.advancedinstaller.com/user-g ... tware.html

Hope this helps.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
anaorec
Posts: 6
Joined: Fri Sep 29, 2006 12:12 pm

Excellent!

Thanks for your help and prompt replies. Very, very, very helpful!

Thanks a million
:D

Regards,
Ana

Return to “Common Problems”