Dustin Talk commented on Improvement MJSPC-53

A clean and concise method to fix this in the next alpha and for version 1.4.7

1.4.7
_________

// Find the tools.jar and add it to the classpath
String toolsJar = null;
if (System.getProperty("os.name").equals("Mac OS X")) {
if(System.getProperty("java.version").compareTo("1.7") >= 0)

{ toolsJar = System.getProperty("java.home") + "/../lib/tools.jar"; }

else

{ toolsJar = System.getProperty("java.home") + "/../Classes/classes.jar"; }

} else

{ toolsJar = System.getProperty("java.home") + File.separatorChar + ".." + File.separatorChar + "lib" + File.separatorChar + "tools.jar"; }

2.0.alpha4
_____________

/**

  • Figure out where the tools.jar file lives.
    */
    private File findToolsJar() {
    def javaHome = new File(System.properties['java.home'])
    def isJavaSeven = System.properties['java.version'].split ( /\./ )[1] > '6'

def file
if (SystemUtils.IS_OS_MAC_OSX && !isJavaSeven)

{ file = new File(javaHome, '../Classes/classes.jar').canonicalFile }

else

{ file = new File(javaHome, '../lib/tools.jar').canonicalFile }

assert file.exists() : "Missing tools.jar at: $file"

log.debug("Using tools.jar: $file")

return file
}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to