java setup
authorClaus Gittinger <cg@exept.de>
Mon, 14 Feb 2000 19:53:23 +0100
changeset 2609 41920e69990a
parent 2608 c3260d4c3061
child 2610 cda4830c40a6
java setup
AbstractLauncherApplication.st
--- a/AbstractLauncherApplication.st	Mon Feb 14 15:47:52 2000 +0100
+++ b/AbstractLauncherApplication.st	Mon Feb 14 19:53:23 2000 +0100
@@ -2254,7 +2254,7 @@
 javaSettingsFor:requestor
     "open a dialog on settings related to the java subsystem"
 
-    |box audio javaHome resources component
+    |box audio javaHome classPath oldJavaHome oldClassPath resources component
      extraFileSecurityChecks extraSocketSecurityChecks
      supportsJustInTimeCompilation 
      javaJustInTimeCompilation javaNativeCodeOptimization
@@ -2275,7 +2275,18 @@
     exceptionDebug := JavaVM exceptionDebug asValue.
     nullPointerExceptionDebug := JavaVM nullPointerExceptionDebug asValue.
 
-    javaHome := (Java javaHome ? '') asValue.
+    classPath := (Java classPath ? '').
+    OperatingSystem isUNIXlike ifTrue:[
+        classPath := (classPath asStringWith:$;) asValue.
+    ] ifFalse:[
+        classPath := (classPath asStringWith:$:) asValue.
+    ].
+    oldClassPath := classPath copy.
+    classPath := classPath asValue.
+
+    javaHome := (Java javaHome ? '').
+    oldJavaHome := javaHome copy.
+    javaHome := javaHome asValue.
 
     box := DialogBox new.
     box label:(resources string:'Java').
@@ -2298,6 +2309,13 @@
     box addCheckBox:(resources string:'Display java byteCode (i.e. not source)') on:showJavaByteCode.
     box addHorizontalLine.
     component := box 
+                    addLabelledInputField:(resources string:'classPath:')
+                    adjust:#right
+                    on:classPath 
+                    tabable:true
+                    separateAtX:0.3.
+    component acceptOnLeave:false.
+    component := box 
                     addLabelledInputField:(resources string:'java home:')
                     adjust:#right
                     on:javaHome 
@@ -2310,14 +2328,14 @@
                         label:(resources string:'Reinit VM now') 
                         action:[
                                 box windowGroup withWaitCursorDo:[
-                                    Java classPath size == 0 ifTrue:[
-                                        Java initialize.
-                                    ].
-                                    Java classPath size == 0 ifTrue:[
-                                        self warn:'No JDK found'.
-                                    ] ifFalse:[
+"/                                    Java classPath size == 0 ifTrue:[
+"/                                        Java initialize.
+"/                                    ].
+"/                                    Java classPath size == 0 ifTrue:[
+"/                                        self warn:'No JDK found'.
+"/                                    ] ifFalse:[
                                         JavaVM initializeVM
-                                    ]
+"/                                    ]
                                 ]
                                ]).
 
@@ -2336,12 +2354,23 @@
     box open.
 
     box accepted ifTrue:[
+        classPath value ~= oldClassPath ifTrue:[
+            OperatingSystem isUNIXlike ifTrue:[
+                classPath := (classPath value asCollectionOfSubstringsSeparatedBy:$:)
+            ] ifFalse:[
+                classPath := (classPath value asCollectionOfSubstringsSeparatedBy:$;)
+            ].
+            Java classPath:classPath
+        ].
+        Java javaHome:javaHome value.
+
         JavaMethod forceByteCodeDisplay:showJavaByteCode value. 
         JavaVM audioEnabled:audio value.
         JavaVM exceptionDebug:exceptionDebug value.
         JavaVM nullPointerExceptionDebug:nullPointerExceptionDebug value.
         JavaVM fileOpenConfirmation: extraFileSecurityChecks value.
         JavaVM socketConnectConfirmation: extraSocketSecurityChecks value.
+
         javaJustInTimeCompilation value ~~ ObjectMemory javaJustInTimeCompilation ifTrue:[
             ObjectMemory javaJustInTimeCompilation:javaJustInTimeCompilation value.
             javaJustInTimeCompilation value ifTrue:[
@@ -5457,5 +5486,5 @@
 !AbstractLauncherApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.101 2000-02-14 14:47:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.102 2000-02-14 18:53:23 cg Exp $'
 ! !