summarylogtreecommitdiffstats
path: root/java_home.patch
blob: 145189372ab101f80b97444095adcf27e35629e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- a/ide/bin/launcher.sh
+++ b/ide/bin/launcher.sh
@@ -959,34 +959,11 @@
   # Once the new path for java has been determined, truncate the /bin/java
   # ending portion of it and set javahome with the trucated path
   #
-  if [ -f "$tmpvar" ]
+  tmpvar=/usr/lib/jvm/default
+  if [ -d "$tmpvar" ]
   then
-    while [ -h "$tmpvar" ]
-    do
-        EchoIfVerbose "Found symlinked JDK, following symlink: $tmpvar"
-        tmpvar2=`ls -ls "$tmpvar"`
-        EchoIfVerbose "The long listing of $tmpvar: '$tmpvar2'"
-        tmpvar2=`expr "$tmpvar2" : '.*-> \(.*\)$'`
-        EchoIfVerbose "If we still have a symlink, follow it again: '$tmpvar2'"
-        if [ `expr "$tmpvar2" : "\.\/"` -gt 0 -o `expr "$tmpvar2" : "\.\.\/"` -gt 0 -o `expr "$tmpvar2" : ".*/.*"` -le 0 ]
-        then
-          tmpvar="`dirname "$tmpvar"`/$tmpvar2"
-          EchoIfVerbose "Calling dirname on symlink and appending '/$tmpvar2' resulting in '$tmpvar'"
-        else
-          tmpvar="$tmpvar2"
-          EchoIfVerbose "Using '$tmpvar2' as-is"
-        fi
-    done
-    EchoIfVerbose "If it exists, truncate /bin/java ending of '$tmpvar', otherwise path becomes empty"
-    tmpvar=`expr "$tmpvar" : '\(.*\)\/bin\/[^\/]*$'`
-    EchoIfVerbose "Found javahome: '$tmpvar'"
-    if [ "X$tmpvar" = "X" ]
-    then
-        EchoIfVerbose "Invalid symlinked JDK, no default JDK found"
-    else
       SetJavaHome "$tmpvar"
       EchoIfVerbose "Found existing default JDK $tmpvar"
-    fi
   else
     EchoIfVerbose "No existing default JDK found"
   fi