[izpack-devel] Patch to allow JDKPathPanel to work properly on MacOSX .. and more
Grégory Joseph
gregory.joseph at magnolia.info
Thu Dec 14 19:29:30 CET 2006
I forgot to mention: it also makes it works (ie "find" a default JDK)
on systems where the JAVA_HOME env.var points to a JDK, on systems
where the installer is started *with* a jdk's java and on systems
where the JAVA_HOME env.var points to a JRE which is in a subdir of a
JDK but where the installer is started with another JDK (ie JAVA_HOME
not in synch with PATH, or the mighty MS JVM...)
I worked on the 3.9.0 tag, but the patch is applicable on the trunk too.
g
On Dec 14, 2006, at 19:17 , Grégory Joseph wrote:
> Hi list,
>
> As mentionned on the user-list, the JDKPathPanel does not work
> properly on MacOSX: it tries to get the parent directory of the
> running vm (idata.getVariable("JAVA_HOME"), which confusingly
> actually corresponds to System.getProperty("java.home")), which
> makes no sense on MacOSX (i.e this will not point to a jdk if we're
> running from a jre). Since I wasn't checking for a minimal version
> in my installer, the installed application just did not work.
>
> Anyways, here's my patch for this. Instead of just trying to find a
> jdk at java.home's parent, it checks
> java.home
> java.home's parent
> JAVA_HOME (the system env. variable)
> JAVA_HOME's parent
>
> As you'll see, I had to introduce a pathIsValid(String path) method
> in PathInputPanel, which is actually probably a good thing and
> should help in further separating gui code from logic, and for
> instance, avoids unnecessary calls to
> pathSelectionPanel.setPath(chosenPath) (lines 126-129 in JDKPathPanel)
>
> Please let me know what you think.
>
> Cheers,
>
> greg
>
> <jdkpathpanel.patch>
>
> _______________________________________________
> izpack-devel mailing list
> izpack-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-devel
More information about the izpack-devel
mailing list