annotate zshrc-jdk @ 116:ebee1c499f19

add the global nodejs install dir to the PATH
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 25 Jan 2017 08:20:46 +0100
parents 47174e41b448
children e72a98823522
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1 #
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 # zshrc for handling different Maven versions
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3 #
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
5 switchJdk() {
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
6 local jdkName="$1"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7 local new_path=`removeFromPath "jdk"`
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
8 export JAVA_HOME=`/usr/bin/java-config-2 --select-vm=${jdkName} -O`
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
9 export JAVAC=${JAVA_HOME}/bin/javac
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
10 export JDK_HOME=${JAVA_HOME}
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
11 export PATH="${JAVA_HOME}/bin":"${new_path}"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
12 java -version
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
13 }
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
14
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
15 ibmJdk5() {
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
16 switchJdk "ibm-jdk-bin-1.5"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
17 }
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
18
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
19 ibmJdk6() {
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
20 switchJdk "ibm-jdk-bin-1.6"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
21 }
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
22
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
23 jdk14() {
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
24 switchJdk "sun-jdk-1.4"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
25 }
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
26
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
27 jdk5() {
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
28 switchJdk "sun-jdk-1.5"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
29 }
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
30
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
31 jdk6() {
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
32 switchJdk "sun-jdk-1.6"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
33 }
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
34
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
35 jdk7() {
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
36 switchJdk "oracle-jdk-bin-1.7"
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
37 }
48
47174e41b448 add a switch for Java 8
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
38
47174e41b448 add a switch for Java 8
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
39 jdk8() {
47174e41b448 add a switch for Java 8
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
40 switchJdk "oracle-jdk-bin-1.8"
47174e41b448 add a switch for Java 8
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
41 }