[izpack-devel] Patch to allow JDKPathPanel to work properly onMacOSX .. and more

Bartz, Klaus Klaus.Bartz at coi.de
Fri Dec 15 09:06:40 CET 2006


Hi Greg,
thank you for the patch. I hope I can look into and test it 
next week.

Cheers

Klaus

>-----Original Message-----
>From: izpack-devel-bounces at lists.berlios.de
>[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Grégory
>Joseph
>Sent: Thursday, December 14, 2006 7:17 PM
>To: izpack-devel at lists.berlios.de
>Subject: [izpack-devel] Patch to allow JDKPathPanel to work properly
>onMacOSX .. and more
>
>
>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
>
>



More information about the izpack-devel mailing list