installer problem

P

patrick

I make an installer for my java application with install4j, bundling a
static JRE 1.5 . I run the installer on a machine with a JRE 1.6 already
installed.

I run the application and it runs OK up to this line:

Process proc = Runtime.getRuntime().exec(command);

where command is a keytool.exe command.
This gives an exception error:

Registry key 'Software\JavaSoft\JavaRuntimeEnvironment\CurrentVersion'
has value '1.6', but '1.5' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.


Any idea how to fix this?

Does the keytool.exe start a second JVM ??

Looks like it does and gets confused between 2 different installed versions
of the JRE.

Deleting a java.dll or uninstalling a JRE would not be nice option to fix
this.

patrick
 
S

Steve W. Jackson

"patrick said:
I make an installer for my java application with install4j, bundling a
static JRE 1.5 . I run the installer on a machine with a JRE 1.6 already
installed.

I run the application and it runs OK up to this line:

Process proc = Runtime.getRuntime().exec(command);

where command is a keytool.exe command.
This gives an exception error:

Registry key 'Software\JavaSoft\JavaRuntimeEnvironment\CurrentVersion'
has value '1.6', but '1.5' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.


Any idea how to fix this?

Does the keytool.exe start a second JVM ??

Looks like it does and gets confused between 2 different installed versions
of the JRE.

Deleting a java.dll or uninstalling a JRE would not be nice option to fix
this.

patrick

There's nothing in your sample that shows what's actually contained in
the "command" variable, so I'm guessing it's basically just
"keytool.exe" or something close. If that's the case, then it seems
likely that the system's search path is being used to locate the
keytool.exe file, which you don't want. If you've bundled a JRE with
the application, you want to ensure that you use its keytool.exe by
specifying the path relative to your application's starting point.
 
P

patrick

No doesnt work. Ive tried it with the absolute path to keytool.exe and get
the same bug.

patrick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,187
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top