cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
qjvictor
Level 4

custom code problem.

during the installation, I have to invoke an external custom jar to check some resources.
my problem is that the custom jar file is compiled with jdk 1.6 (have to compile with 1.6), but when installing, there is no guarantee that jdk1.6 is in customer's path (they might have both 1.6 and 1.5 installed, but with 1.5 in path), so my custom codes couldn't be invoked correctly.


is there anyway to specify the jdk1.6+ to invoke my custom codes in this case?

Thanks.
Labels (1)
0 Kudos
(6) Replies
nosrednayduj
Level 7

I bundle the VM to take care of this problem.
0 Kudos
pv7721
Level 20

I was about to suggest the same thing. Or unless there are Java 1.6 specific functionalities you may want to build the code with Java 1.5 or have the installer run against Java 1.6+ (and this would eliminate Java versions less than 1.6 from the list of suitable VMs when the installer checks for them on end-user machines).
0 Kudos
qjvictor
Level 4

Thanks for your replying.

if I force the installer to run only jdk1.6+, and the customer has 1.5 in his path, even he installed jdk1.6, the installer would complain no jvm found, is it correct?
0 Kudos
pv7721
Level 20

AFAIK, no, because he also installed JVM 1.6 (unless it's not in the path). This is why our suggestion was to bundle the correct JVM that matches the version of with which your installer's custom code was compiled. This way your installer is always guaranteed to run (and your uninstaller too!)
0 Kudos
qjvictor
Level 4

thank you.
0 Kudos
Rouslan
Level 4

1)You can use "System Search" to search for java.exe in "ProgramFiles\Java". in successfull search case some property "MY_SYSTEM_SEARCH_PROPERTY" will be defined.
2)After you can use "Error Message" type custom action to show your "Please install JRE..." message with "MY_SYSTEM_SEARCH_PROPERTY"
in conditions (this means that property defined).
0 Kudos