Hi,
I have a simple java app to install, but can not find out how to do it using AI 3.2 for java.
My app uses the Java comm api, requiring files to be placed in specific directories of the active JRE. Most of my users have multiple JRE's installed, which must not be upset and I do NOT want to bundle another JRE. Offering a download if no compatible version exists would be OK.
1- How do I find the current JRE path?
In another another post this solution was offered:
"You could use a search for a registry key. The JavaHome registry entry stores the value to the Java directory. It's location is HKLM/Software/JavaSoft/Java Runtime Environment/x.x.x. (xxx = the version). Then you could use the property resulted after the search"
Unfortunately, it does not work that way. HKLM/Software/JavaSoft/Java Runtime Environment/currentversion gives the main version (like 1.5)
then using that you have to get HKLM/Software/JavaSoft/Java Runtime Environment/1.5/JavaHome which returns what we need (C:\Program Files\Java\jre1.5.0_04)
Please explain how to perform this double lookup, and then make a propertybased directory with the result ?
2- Assuming we just pick one that "might" exist, the way you suggest and make it into a property base directory. We can now put files in that directory. But what if the search fails and the key is not there? How do I handle that case?
3- I have not found any Java specific features in AI3.2 that help me with this installation. I see no benefit to them. Solving the problems above was exactly what I hoped for. Am I taking the wrong approach?
Please help, thanks,
Erwin