diff zshrc-jdk @ 0:8b245298349a

zsh environment - initial import
author Dirk Olmes <dirk@xanthippe.ping.de>
date Mon, 28 Nov 2011 12:36:49 +0100
parents
children 47174e41b448
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zshrc-jdk	Mon Nov 28 12:36:49 2011 +0100
@@ -0,0 +1,37 @@
+#
+# zshrc for handling different Maven versions
+#
+
+switchJdk() {
+    local jdkName="$1"
+    local new_path=`removeFromPath "jdk"`
+    export JAVA_HOME=`/usr/bin/java-config-2 --select-vm=${jdkName} -O`
+    export JAVAC=${JAVA_HOME}/bin/javac
+    export JDK_HOME=${JAVA_HOME}
+    export PATH="${JAVA_HOME}/bin":"${new_path}"
+    java -version
+}
+
+ibmJdk5() {
+    switchJdk "ibm-jdk-bin-1.5"
+}
+
+ibmJdk6() {
+    switchJdk "ibm-jdk-bin-1.6"
+}
+
+jdk14() {
+    switchJdk "sun-jdk-1.4"
+}
+
+jdk5() {
+    switchJdk "sun-jdk-1.5"
+}
+
+jdk6() {
+    switchJdk "sun-jdk-1.6"
+}
+
+jdk7() {
+    switchJdk "oracle-jdk-bin-1.7"
+}