Silent JRE Installation (Win32)

Posted on 2000-04-18
Last Modified: 2013-11-23
Hi all,

Whenever I install a Java application for someone who doesnt have current version of the JRE, I explicitly call the JRE installation program from my installation program (InstallShield).  This creates an installation inside of an installation.  This confuses some customers (usually not the smart ones ;)).  I would like to have an installation program that silently installs the JRE (along with XML and JMF) along with my own files.
Unfortunately, I can't just plop the files out there since I need the "Executable Jar" and Plugin capabilities.
I can't seem to find what all is done during the installation and I can't find anything on the web stating the registry entries that are made.
Im only concerned with the Windows side of things (UNIX people seem to know what they are doing... go figure :))

I found the following registry entries.  However, I don't know which ones I need (and if there are more).  
HKEY_CURRENT_USER\Software\JavaSoft\Java Plug-in  *
HKEY_LOCAL_MACHINE\Software\JavaSoft *
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\javaw.Exe
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\JRE 1.3
HKEY_USERS\.DEFAULT\Software\JavaSoft\Java Plug-in

I'd prefer not to blow up anything locally by playing around with it. (Ive done it before).  I know enough about the Win32 registry to be dangerous.
An extra 200 points if you can give me info about the installation of JMF (I believe thats just a jar file installation, but not sure) and XML (Id prefer the IBM implementation (until xerces comes out)).  This may also be a simple jar file implementation (although the Sun implementation does registry entries).

Thanks.  Any comments are welcome.
Question by:conick
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 2729234
So u need Executable jar... rt?
Here it is....

How to Create an Executable JAR File

                   In JDK 1.2, you can run a JAR-packaged application by simply double clicking a JAR file in
                   Windows Explorer or running it in the command line without specifying the class with the main
                   method.  In order to do this, simply follow the following steps

                   1. Create a manifest file, which is an ordinary text file that contains meta-information about the
                   archive stored in the JAR file and indicate which class is the application’s entry point.  You can do
                   this by adding the line:  

                   Main-Class: classname

                   into the manifest file.  The value, classname, is the name of the class that contains the main
                   method (e.g., com.cyberj.MyProgram).

                   2. Create the JAR files with the manifest file that contains the appropriate Main-Class:
                   header.  You could merge the manifest file you created in step 1 into the jar file’s manifest with
                   a command such as this:

                   jar cmf manifestfile myapp.jar com/cyberj/*.class

                   Let's look at the options and arguments used in this command:
                   · The c option indicates that you want to create a JAR file.
                   · The m option indicates that you want to merge information from an existing manifest file into
                   the manifest file of the JAR file you're creating.
                   · The f option indicates that you want the output to go to a file (the JAR file you're creating).
                   · manifestfile is the name of the existing text file whose contents you want included in the JAR
                   file's manifest.
                   · myapp.jar is the name that you want the resulting JAR file to have.
                   · The com/cyberj/*.class are the files you want to be placed in your JAR file.  This argument can
                   be a space-separated list of one or more files that you want to included in the JAR file.

                   You have to make sure that all necessary class files are included in the JAR file.  

                   3. With your JAR file prepared in this way, you can run the application com.cyberj.MyProgram
                   application from the command line in this way:

                   java -jar myapp.jar

                   Or simply double click the myapp.jar in windows explorer.

                   Note: The -jar option is not available for interpreters prior to version 1.2 of the Java
                   Development Kit.

I hope This will help u...


Author Comment

ID: 2729271
I have that.
What I need is the registry entries that the JRE installation program makes in order for the Java Executable functionality work in Win32. I need that along with other functionality (the Plugin for browsers etc).

My question borders on off-topic. Since it has only to do with Win32 Registry entries and not Java code (or packaging).  However no other group would I find people who know specifics about the JRE installation program (or where to find them).
LVL 16

Accepted Solution

heyhey_ earned 200 total points
ID: 2729435
well, you can always get RegistryMonitor  & FileMonitor ( and find what's happening yourself :)

re executable .jar files: I suppose that instalation routine has mapped the .jar file extension to java.exe (with some parameters)

re JMF: I suppose that you'll have to modify the PATH (or copy the JMF native .dlls to Windows/system/ directory)

just my 0.02 $ :)
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now


Author Comment

ID: 2730598
Thanks heyhey_, I'll check it out.
(I don't know how you find this stuff :))

Points are still available if someone has done this type of thing and would like to share.

Expert Comment

ID: 2735966
how's the huntin'??  

Author Comment

ID: 2736274
be wery wery quiet.. im hunting wabbits.

I've been unavoidably detained until Monday on a different project.  I unfortunately haven't been able try out the sysinternal products to figure out whats being installed.

Author Comment

ID: 2767208
too much #$^%&#% stuff to do.
(its not like its a bad problem)

Anyway...  A week and a half later.....

I havent had a whole lot of time to delve into this problem.  Although the time is fast approaching where I NEED to get this out. (Im suppose to ship the moment 1.3 comes out).

I've played with the tools heyhey mentioned a bit and was amazed by all the @&#^$( Windows was accessing.  I think the logs created for the installation of JMF is a few thousand lines long.  I just havent had time to parse it out.

Anyway I think the tools will work.  I'll try to post what I find when I actually get a chance to figure it all out.

I'll give heyhey the points for pointing out some good tools (I can use these for tons of things).


Why in the world wouldn't someone post what registry entries and files are placed during an install?  With all the standardizaation going on, cant we make that a standard?  
Whats with leaving entries hanging around after an uninstall? Wheres the uninstall police when you need them?
If I see CLASSPATH being set one more time without my permission, Im gonna scream.  (JMF installed it, and then the uninstall program doesnt get rid of it (its not set in autoexec either))

Thanks for letting me vent
I feel much better :)
LVL 16

Expert Comment

ID: 2768226
thanks for the points :)

in fact good unistallation program should remember all the files and registry entries and remove them, but I'm not so familiar with Windows internals ...

Author Comment

ID: 2793289
In case anyone is interested (or still listening in):

I found a couple of links on the Sun site.
This one I remember reading a long time ago.  Basically tells you what is ABSOLUTELY necessary.  This will not install the plugin OR the executable JAR. (This is not an option in my case since I need both the plugin and exe jar file working)

This is the method I will end up using.  I just tried it and it works very slick. (I use InstallShield and I didnt know this functionality existed).

Unfortunately, Silent InstallShield doesnt seem to work for JMF :(.
I may be able to get around it by simply placing the Windows specific DLLs in the %JAVA_HOME%\bin directory. There doesnt seem to be any "noticeably necessary" (huh?:)) registry entries installed during the process.
The JMF install also places the DLLs in %WinDir%\system (system32 for NT) but I believe that is for the M$ Java VM.

If anyone cares I'll post the final installation procedure for JRE, JMF, etc.
Drop a comment if you want me to post the final installation, I can also post the relevent entries in the logs from regmon.exe and/or filemon.exe. If not I wont clutter anyone's inbox anymore :)

Expert Comment

ID: 7844210
i'm interested in the procedure for installing jmf

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Desingning Refactoring existing code 2 31
Chrome and Firefox Java 5 68
SequenceInputStream example 3 22
collection output issue 9 66
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question