How to set environment variables to an application on OSX Mountain Lion?

前端 未结 4 2012
南旧
南旧 2020-12-03 00:13

since the upgrade to OSX Mountain Lion I‘ve got some problems with setting the environment variables for eclipse and maven.

My goal is to run a maven command in Ecli

4条回答
  •  -上瘾入骨i
    2020-12-03 00:41

    From here : https://stackoverflow.com/a/10374886/325742

    #!/bin/sh
    #
    export MAVEN_OPTS=#MAVEN_OPTS_HERE#
    LAUNCHER_JAR=/Applications/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    
    java \
    -showversion \
    -XX:MaxPermSize=256m \
    -Xms1024m \
    -Xmx1024m \
    -Xdock:icon=/Applications/eclipse/Eclipse.app/Contents/Resources/Eclipse.icns \
    -XstartOnFirstThread \
    -Dorg.eclipse.swt.internal.carbon.smallFonts \
    -Dosgi.requiredJavaVersion=1.5 \
    -jar $LAUNCHER_JAR
    

    Then, use the steps on http://mathiasbynens.be/notes/shell-script-mac-apps, to turn the above script into an application that can be kept on the dock.

提交回复
热议问题