[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:17:25 CET 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdkpathpanel.patch
Type: application/octet-stream
Size: 5176 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/izpack-devel/attachments/20061214/9f6ca6b8/attachment.obj
-------------- next part --------------
More information about the izpack-devel
mailing list