Java settings cleanup (part 2): release settings refactored.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 09 Dec 2014 14:49:20 +0000
changeset 3296 761c7bb5853c
parent 3295 87ec39ef23b8
child 3297 8eb3481bfdcf
Java settings cleanup (part 2): release settings refactored. Keep path to Java installation rather than just release selector. This allows user to set JRE/JDK which is not autodetected. Settings dialog UI has been updated accordingly.
Java.st
JavaRelease.st
Make.proto
bc.mak
experiments/experiments.rc
extensions.st
libjava.rc
stx_libjava.st
tools/JavaSettingsApplication.st
tools/tools.rc
--- a/Java.st	Mon Dec 08 10:26:50 2014 +0000
+++ b/Java.st	Tue Dec 09 14:49:20 2014 +0000
@@ -216,13 +216,18 @@
 !
 
 defaultRelease
+    | nm release |
 
-    | nm release |
     "First, consult STX_LIBJAVA_RELEASE environment variable, if set"
     nm := OperatingSystem getEnvironment:'STX_LIBJAVA_RELEASE'.
     nm isNil ifTrue:[
-        "If not defined, ask preferences if preffered release is set"
-        nm := UserPreferences current javaReleaseSelector.
+        | home |
+
+        home := UserPreferences current javaHome.
+        home notEmptyOrNil ifTrue:[ 
+            release := JavaRelease inDirectory: home.
+            release notNil ifTrue:[ ^ release ]
+        ].
     ].
     nm notNil ifTrue:[
         release := JavaRelease perform: nm asSymbol ifNotUnderstood:[nil].
@@ -243,6 +248,7 @@
     "
 
     "Created: / 11-11-2013 / 16:13:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 14:10:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 initAllClasses
--- a/JavaRelease.st	Mon Dec 08 10:26:50 2014 +0000
+++ b/JavaRelease.st	Tue Dec 09 14:49:20 2014 +0000
@@ -399,6 +399,8 @@
     "Returns an instance of JavaRelease for given javaHome or nil if
      given javaHome does not point to Java installation directory."
 
+    self available do:[:each | (each javaHome = javaHome) ifTrue:[ ^ each ] ].
+
     javaHome notNil ifTrue:[
         | releases |
         releases := self allSubclasses reject:[:each | each isAbstract ] thenCollect:[:each | each new ].
@@ -413,11 +415,11 @@
     ^ nil.
 
     "Created: / 11-11-2013 / 14:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (comment): / 08-04-2014 / 14:13:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 13:01:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 system
-    "Return the release for *system* java or nil if not system JDK/JRE
+    "Return the release for *system* java or nil if no system JDK/JRE
      installation is available.
 
      By *system* JDK/JRE we mean JDK/JRE used by `java` command found along the path"
@@ -452,7 +454,7 @@
     "
 
     "Created: / 11-11-2013 / 14:18:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (comment): / 08-12-2014 / 00:14:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 09-12-2014 / 14:03:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaRelease class methodsFor:'instance creation-private'!
@@ -969,7 +971,7 @@
     available := self isAvailable.
 
     available ifTrue:[ 
-        displayString := '%1 (%2%3) ' bindWith: self name
+        displayString := '%1 (%2%3)' bindWith: self name
                                          with: (self jdkHome notNil ifTrue:[ 'JDK' ] ifFalse:[ 'JRE' ])
                                          with: (self isSystem ifTrue:[ ', system' ] ifFalse:[ '' ]).
         self isSystem ifTrue:[ 
@@ -988,7 +990,7 @@
 
     "Created: / 27-07-2012 / 00:01:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 07-12-2014 / 13:31:42 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 08-12-2014 / 09:17:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 14:09:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaRelease methodsFor:'object conversions'!
--- a/Make.proto	Mon Dec 08 10:26:50 2014 +0000
+++ b/Make.proto	Tue Dec 09 14:49:20 2014 +0000
@@ -301,7 +301,7 @@
 $(OUTDIR)ProxyMethodJavaTypeCheckNode.$(O) ProxyMethodJavaTypeCheckNode.$(H): ProxyMethodJavaTypeCheckNode.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodTypeCheckNode.$(H) $(STCHDR)
 $(OUTDIR)JavaNativeMethod.$(O) JavaNativeMethod.$(H): JavaNativeMethod.st $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMethod.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMethodWithException.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMethodWithHandler.$(H) $(STCHDR)
 $(OUTDIR)JavaNativeMethodImpl_OracleJDK8.$(O) JavaNativeMethodImpl_OracleJDK8.$(H): JavaNativeMethodImpl_OracleJDK8.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK7.$(H) $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK8.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libbasic/AbstractNumberVector.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Boolean.$(H) $(INCLUDE_TOP)/stx/libbasic/ByteArray.$(H) $(INCLUDE_TOP)/stx/libbasic/Character.$(H) $(INCLUDE_TOP)/stx/libbasic/CharacterArray.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ConfigurableFeatures.$(H) $(INCLUDE_TOP)/stx/libbasic/Delay.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/DoubleArray.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/ExternalStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Float.$(H) $(INCLUDE_TOP)/stx/libbasic/FloatArray.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Integer.$(H) $(INCLUDE_TOP)/stx/libbasic/LargeInteger.$(H) $(INCLUDE_TOP)/stx/libbasic/LimitedPrecisionReal.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Method.$(H) $(INCLUDE_TOP)/stx/libbasic/NonPositionableExternalStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Process.$(H) $(INCLUDE_TOP)/stx/libbasic/ProgrammingLanguage.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadWriteStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Semaphore.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic/ShortFloat.$(H) $(INCLUDE_TOP)/stx/libbasic/SmallInteger.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(INCLUDE_TOP)/stx/libbasic/String.$(H) $(INCLUDE_TOP)/stx/libbasic/TwoByteString.$(H) $(INCLUDE_TOP)/stx/libbasic/UndefinedObject.$(H) $(INCLUDE_TOP)/stx/libbasic/Unicode16String.$(H) $(INCLUDE_TOP)/stx/libbasic/UninterpretedBytes.$(H) $(INCLUDE_TOP)/stx/libbasic/UserPreferences.$(H) $(INCLUDE_TOP)/stx/libbasic/WriteStream.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedLongIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedWordArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/Socket.$(H) $(INCLUDE_TOP)/stx/libbasic2/UnboxedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/WordArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/ZipArchive.$(H) $(INCLUDE_TOP)/stx/libbasic3/WrappedMethod.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libbasic/AbstractNumberVector.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Boolean.$(H) $(INCLUDE_TOP)/stx/libbasic/ByteArray.$(H) $(INCLUDE_TOP)/stx/libbasic/Character.$(H) $(INCLUDE_TOP)/stx/libbasic/CharacterArray.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ConfigurableFeatures.$(H) $(INCLUDE_TOP)/stx/libbasic/Delay.$(H) $(INCLUDE_TOP)/stx/libbasic/DoubleArray.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/ExternalStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Float.$(H) $(INCLUDE_TOP)/stx/libbasic/FloatArray.$(H) $(INCLUDE_TOP)/stx/libbasic/Integer.$(H) $(INCLUDE_TOP)/stx/libbasic/LargeInteger.$(H) $(INCLUDE_TOP)/stx/libbasic/LimitedPrecisionReal.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Method.$(H) $(INCLUDE_TOP)/stx/libbasic/NonPositionableExternalStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Process.$(H) $(INCLUDE_TOP)/stx/libbasic/ProgrammingLanguage.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadWriteStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Semaphore.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic/ShortFloat.$(H) $(INCLUDE_TOP)/stx/libbasic/SmallInteger.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(INCLUDE_TOP)/stx/libbasic/String.$(H) $(INCLUDE_TOP)/stx/libbasic/TwoByteString.$(H) $(INCLUDE_TOP)/stx/libbasic/UndefinedObject.$(H) $(INCLUDE_TOP)/stx/libbasic/Unicode16String.$(H) $(INCLUDE_TOP)/stx/libbasic/UninterpretedBytes.$(H) $(INCLUDE_TOP)/stx/libbasic/WriteStream.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedLongIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/SignedWordArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/Socket.$(H) $(INCLUDE_TOP)/stx/libbasic2/UnboxedIntegerArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/WordArray.$(H) $(INCLUDE_TOP)/stx/libbasic2/ZipArchive.$(H) $(INCLUDE_TOP)/stx/libbasic3/WrappedMethod.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
 
--- a/bc.mak	Mon Dec 08 10:26:50 2014 +0000
+++ b/bc.mak	Tue Dec 09 14:49:20 2014 +0000
@@ -235,7 +235,7 @@
 $(OUTDIR)ProxyMethodJavaTypeCheckNode.$(O) ProxyMethodJavaTypeCheckNode.$(H): ProxyMethodJavaTypeCheckNode.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodTypeCheckNode.$(H) $(STCHDR)
 $(OUTDIR)JavaNativeMethod.$(O) JavaNativeMethod.$(H): JavaNativeMethod.st $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMethod.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMethodWithException.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMethodWithHandler.$(H) $(STCHDR)
 $(OUTDIR)JavaNativeMethodImpl_OracleJDK8.$(O) JavaNativeMethodImpl_OracleJDK8.$(H): JavaNativeMethodImpl_OracleJDK8.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK7.$(H) $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK8.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libbasic\AbstractNumberVector.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Boolean.$(H) $(INCLUDE_TOP)\stx\libbasic\ByteArray.$(H) $(INCLUDE_TOP)\stx\libbasic\Character.$(H) $(INCLUDE_TOP)\stx\libbasic\CharacterArray.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ConfigurableFeatures.$(H) $(INCLUDE_TOP)\stx\libbasic\Delay.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\DoubleArray.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\ExternalStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Float.$(H) $(INCLUDE_TOP)\stx\libbasic\FloatArray.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Integer.$(H) $(INCLUDE_TOP)\stx\libbasic\LargeInteger.$(H) $(INCLUDE_TOP)\stx\libbasic\LimitedPrecisionReal.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Method.$(H) $(INCLUDE_TOP)\stx\libbasic\NonPositionableExternalStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Process.$(H) $(INCLUDE_TOP)\stx\libbasic\ProgrammingLanguage.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadWriteStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Semaphore.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic\ShortFloat.$(H) $(INCLUDE_TOP)\stx\libbasic\SmallInteger.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(INCLUDE_TOP)\stx\libbasic\String.$(H) $(INCLUDE_TOP)\stx\libbasic\TwoByteString.$(H) $(INCLUDE_TOP)\stx\libbasic\UndefinedObject.$(H) $(INCLUDE_TOP)\stx\libbasic\Unicode16String.$(H) $(INCLUDE_TOP)\stx\libbasic\UninterpretedBytes.$(H) $(INCLUDE_TOP)\stx\libbasic\UserPreferences.$(H) $(INCLUDE_TOP)\stx\libbasic\WriteStream.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedLongIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedWordArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\Socket.$(H) $(INCLUDE_TOP)\stx\libbasic2\UnboxedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\WordArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\ZipArchive.$(H) $(INCLUDE_TOP)\stx\libbasic3\WrappedMethod.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libbasic\AbstractNumberVector.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Boolean.$(H) $(INCLUDE_TOP)\stx\libbasic\ByteArray.$(H) $(INCLUDE_TOP)\stx\libbasic\Character.$(H) $(INCLUDE_TOP)\stx\libbasic\CharacterArray.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ConfigurableFeatures.$(H) $(INCLUDE_TOP)\stx\libbasic\Delay.$(H) $(INCLUDE_TOP)\stx\libbasic\DoubleArray.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\ExternalStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Float.$(H) $(INCLUDE_TOP)\stx\libbasic\FloatArray.$(H) $(INCLUDE_TOP)\stx\libbasic\Integer.$(H) $(INCLUDE_TOP)\stx\libbasic\LargeInteger.$(H) $(INCLUDE_TOP)\stx\libbasic\LimitedPrecisionReal.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Method.$(H) $(INCLUDE_TOP)\stx\libbasic\NonPositionableExternalStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Process.$(H) $(INCLUDE_TOP)\stx\libbasic\ProgrammingLanguage.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadWriteStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Semaphore.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic\ShortFloat.$(H) $(INCLUDE_TOP)\stx\libbasic\SmallInteger.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(INCLUDE_TOP)\stx\libbasic\String.$(H) $(INCLUDE_TOP)\stx\libbasic\TwoByteString.$(H) $(INCLUDE_TOP)\stx\libbasic\UndefinedObject.$(H) $(INCLUDE_TOP)\stx\libbasic\Unicode16String.$(H) $(INCLUDE_TOP)\stx\libbasic\UninterpretedBytes.$(H) $(INCLUDE_TOP)\stx\libbasic\WriteStream.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedLongIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\SignedWordArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\Socket.$(H) $(INCLUDE_TOP)\stx\libbasic2\UnboxedIntegerArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\WordArray.$(H) $(INCLUDE_TOP)\stx\libbasic2\ZipArchive.$(H) $(INCLUDE_TOP)\stx\libbasic3\WrappedMethod.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
 
--- a/experiments/experiments.rc	Mon Dec 08 10:26:50 2014 +0000
+++ b/experiments/experiments.rc	Tue Dec 09 14:49:20 2014 +0000
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2014\nCopyright eXept Software AG 1998-2014\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.5.0\0"
-      VALUE "ProductDate", "Mon, 08 Dec 2014 10:20:54 GMT\0"
+      VALUE "ProductDate", "Tue, 09 Dec 2014 14:46:46 GMT\0"
     END
 
   END
--- a/extensions.st	Mon Dec 08 10:26:50 2014 +0000
+++ b/extensions.st	Tue Dec 09 14:49:20 2014 +0000
@@ -1830,64 +1830,6 @@
     "Created: / 18-01-2013 / 22:27:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-!UserPreferences methodsFor:'accessing-java'!
-
-javaRelease
-    "Return the Java release according to the preferences
-     or nil, if not set"
-
-    | rel sel |
-    sel := self javaReleaseSelector.
-    sel notNil ifTrue:[
-        rel := JavaRelease perform: sel asSymbol ifNotUnderstood:[nil]
-    ].
-    ^rel
-
-    "Created: / 27-07-2012 / 10:12:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!UserPreferences methodsFor:'accessing-java'!
-
-javaReleaseSelector
-    ^ self at:#javaReleaseSelector ifAbsent:[nil].
-
-    "
-        UserPreferences current javaReleaseSelector
-        UserPreferences current javaReleaseSelector: #openJDK6
-        UserPreferences current javaReleaseSelector: nil
-
-        Java release
-    "
-
-    "Created: / 27-07-2012 / 10:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!UserPreferences methodsFor:'accessing-java'!
-
-javaReleaseSelector: name
-    "Sets the Java release to use. selector must be one of
-     releases defined in JavaRelease, protocol 'instance creation'"
-
-    self at:#javaReleaseSelector put: name.
-"/    Java notNil ifTrue:[
-"/        Java reinitializeRelease
-"/    ].
-
-
-    "
-        UserPreferences current javaReleaseSelector
-        UserPreferences current javaReleaseSelector: #openJDK7
-        UserPreferences current javaReleaseSelector: nil
-
-        Java release
-        Java release:nil
-
-        Java reinitializeRelease
-    "
-
-    "Created: / 27-07-2012 / 10:02:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
 !WordArray class methodsFor:'testing'!
 
 isInterface
--- a/libjava.rc	Mon Dec 08 10:26:50 2014 +0000
+++ b/libjava.rc	Tue Dec 09 14:49:20 2014 +0000
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\n          SWING Research Group, Czech Technical University In Prague\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.5.0\0"
-      VALUE "ProductDate", "Mon, 08 Dec 2014 10:20:52 GMT\0"
+      VALUE "ProductDate", "Tue, 09 Dec 2014 14:46:44 GMT\0"
     END
 
   END
--- a/stx_libjava.st	Mon Dec 08 10:26:50 2014 +0000
+++ b/stx_libjava.st	Tue Dec 09 14:49:20 2014 +0000
@@ -605,9 +605,6 @@
         'Boolean class' javaWrap:
         ProgrammingLanguage isGroovy
         ProgrammingLanguage isJavaLike
-        UserPreferences javaRelease
-        UserPreferences javaReleaseSelector
-        UserPreferences javaReleaseSelector:
         Class javaMirror
         Class javaMirrorClass
         ExecutableFunction isJavaConstructor
--- a/tools/JavaSettingsApplication.st	Mon Dec 08 10:26:50 2014 +0000
+++ b/tools/JavaSettingsApplication.st	Tue Dec 09 14:49:20 2014 +0000
@@ -1,9 +1,8 @@
 "{ Package: 'stx:libjava/tools' }"
 
 AbstractSettingsApplication subclass:#JavaSettingsApplication
-	instanceVariableNames:'javaReleaseHolder javaReleaseList javaHomeHolder
-		javaReleaseIsCustomHolder infoPanel jdkBundleHolder
-		environmentBundleHolder packageBundleHolder userBundleHolder'
+	instanceVariableNames:'javaHomeHolder infoPanel jdkBundleHolder environmentBundleHolder
+		packageBundleHolder userBundleHolder javaHomeInfoHolder'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Languages-Java-Tools'
@@ -379,129 +378,123 @@
     <resource: #canvas>
 
     ^ 
-     #(FullSpec
-        name: windowSpec
-        window: 
-       (WindowSpec
-          label: 'Java Settings'
-          name: 'Java Settings'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 695 627)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (LabelSpec
-              label: ' Java Settings'
-              name: 'SubVersiSettingsTitle'
-              layout: (LayoutFrame 0 0 0 0 0 1 66 0)
-              style: (FontDescription helvetica medium roman 18 #'iso10646-1')
-              backgroundColor: (Color 100.0 100.0 100.0)
-              translateLabel: true
-              adjust: left
-            )
-           (LabelSpec
-              label: 'Icon'
-              name: 'JavaIcon'
-              layout: (LayoutFrame -75 1 0 0 0 1 66 0)
-              hasCharacterOrientedLabel: false
-              backgroundColor: (Color 100.0 100.0 100.0)
-              translateLabel: true
-              labelChannel: libjavaCupIcon
-            )
-           (SubCanvasSpec
-              name: 'InfoPanel'
-              layout: (LayoutFrame 0 0 67 0 0 1 107 0)
-              level: 0
-              initiallyInvisible: true
-              hasHorizontalScrollBar: false
-              hasVerticalScrollBar: false
-              clientKey: infoPanel
-              createNewBuilder: false
-            )
-           (VerticalPanelViewSpec
-              name: 'Controls'
-              layout: (LayoutFrame 0 0 70 0 0 1 0 1)
-              horizontalLayout: fit
-              verticalLayout: topFit
-              horizontalSpace: 3
-              verticalSpace: 3
-              component: 
-             (SpecCollection
-                collection: (
-                 (FramedBoxSpec
-                    label: 'Basic Settings'
-                    name: 'JavaReleasePanel'
-                    labelPosition: topLeft
-                    translateLabel: true
-                    component: 
-                   (SpecCollection
-                      collection: (
-                       (ComboListSpec
-                          name: 'ReleaseList'
-                          layout: (LayoutFrame 100 0 0 0 0 1 25 0)
-                          model: javaReleaseHolder
-                          comboList: javaReleaseList
-                          useIndex: false
-                        )
-                       (LabelSpec
-                          label: 'Release:'
-                          name: 'ReleaseLabel'
-                          layout: (LayoutFrame 0 0 0 0 100 0 25 0)
-                          translateLabel: true
-                          adjust: left
-                        )
-                       (LabelSpec
-                          label: 'JAVA_HOME'
-                          name: 'JAVA_HOME_Label'
-                          layout: (LayoutFrame 0 0 30 0 100 0 55 0)
-                          translateLabel: true
-                          adjust: left
-                        )
-                       (FilenameInputFieldSpec
-                          name: 'JAVA_HOME'
-                          layout: (LayoutFrame 100 0 30 0 -55 1 55 0)
-                          enableChannel: javaReleaseIsCustomHolder
-                          model: javaHomeHolder
-                          immediateAccept: true
-                          acceptOnPointerLeave: true
-                        )
-                       (ActionButtonSpec
-                          label: 'Browse'
-                          name: 'JAVA_HOME_Browse'
-                          layout: (LayoutFrame -50 1 30 0 0 1 55 0)
-                          translateLabel: true
-                          model: doBrowseJavaHome
-                          enableChannel: javaReleaseIsCustomHolder
-                        )
+    #(FullSpec
+       name: windowSpec
+       window: 
+      (WindowSpec
+         label: 'Java Settings'
+         name: 'Java Settings'
+         min: (Point 10 10)
+         bounds: (Rectangle 0 0 695 627)
+       )
+       component: 
+      (SpecCollection
+         collection: (
+          (LabelSpec
+             label: ' Java Settings'
+             name: 'SubVersiSettingsTitle'
+             layout: (LayoutFrame 0 0 0 0 0 1 66 0)
+             style: (FontDescription helvetica medium roman 18 #'iso10646-1')
+             backgroundColor: (Color 100.0 100.0 100.0)
+             translateLabel: true
+             adjust: left
+           )
+          (LabelSpec
+             label: 'Icon'
+             name: 'JavaIcon'
+             layout: (LayoutFrame -75 1 0 0 0 1 66 0)
+             hasCharacterOrientedLabel: false
+             backgroundColor: (Color 100.0 100.0 100.0)
+             translateLabel: true
+             labelChannel: libjavaCupIcon
+           )
+          (SubCanvasSpec
+             name: 'InfoPanel'
+             layout: (LayoutFrame 0 0 67 0 0 1 107 0)
+             level: 0
+             initiallyInvisible: true
+             hasHorizontalScrollBar: false
+             hasVerticalScrollBar: false
+             clientKey: infoPanel
+             createNewBuilder: false
+           )
+          (VerticalPanelViewSpec
+             name: 'Controls'
+             layout: (LayoutFrame 0 0 70 0 0 1 0 1)
+             horizontalLayout: fit
+             verticalLayout: topFit
+             horizontalSpace: 3
+             verticalSpace: 3
+             component: 
+            (SpecCollection
+               collection: (
+                (FramedBoxSpec
+                   label: 'Basic Settings'
+                   name: 'JavaReleasePanel'
+                   labelPosition: topLeft
+                   translateLabel: true
+                   component: 
+                  (SpecCollection
+                     collection: (
+                      (LabelSpec
+                         label: 'Java Home:'
+                         name: 'JavaHomeLabel'
+                         layout: (LayoutFrame 0 0 0 0 100 0 25 0)
+                         translateLabel: true
+                         adjust: left
                        )
-                     
-                    )
-                    extent: (Point 695 95)
-                  )
-                 (VariableVerticalPanelSpec
-                    name: 'VariableVerticalPanel1'
-                    component: 
-                   (SpecCollection
-                      collection: (
-                       (NoteBookViewSpec
-                          name: 'Notebook'
-                          menu: tabList
-                        )
+                      (ComboBoxSpec
+                         name: 'JavaHomeField'
+                         layout: (LayoutFrame 100 0.0 0 0 -61 1.0 25 0)
+                         model: javaHomeHolder
+                         acceptOnPointerLeave: false
+                         comboList: javaHomeList
+                         postBuildCallback: postBuildJavaHomeFIeld:
+                       )
+                      (ActionButtonSpec
+                         label: 'Browse'
+                         name: 'Button1'
+                         layout: (LayoutFrame -60 1 0 0 0 1 25 0)
+                         translateLabel: true
+                         model: doBrowseJavaHome
+                       )
+                      (LabelSpec
+                         label: 'Label'
+                         name: 'Label1'
+                         layout: (LayoutFrame 100 0 30 0 0 1 55 0)
+                         translateLabel: true
+                         labelChannel: javaHomeInfoHolder
+                         adjust: left
                        )
-                     
-                    )
-                    extent: (Point 695 459)
-                    handles: (Any 1.0)
-                  )
+                      )
+                    
+                   )
+                   extent: (Point 695 95)
                  )
-               
-              )
-            )
+                (VariableVerticalPanelSpec
+                   name: 'VariableVerticalPanel1'
+                   component: 
+                  (SpecCollection
+                     collection: (
+                      (NoteBookViewSpec
+                         name: 'Notebook'
+                         menu: tabList
+                         translateLabel: true
+                       )
+                      )
+                    
+                   )
+                   extent: (Point 695 459)
+                   handles: (Any 1.0)
+                 )
+                )
+              
+             )
            )
-         
-        )
-      )
+          )
+        
+       )
+     )
 ! !
 
 !JavaSettingsApplication class methodsFor:'list specs'!
@@ -542,12 +535,38 @@
 
     | java_home |
 
-    java_home := Dialog requestDirectoryName:(resources string:'JAVA_HOME directory').
+    java_home := Dialog requestDirectoryName:(resources string:'Java Installation Directory').
     java_home notEmptyOrNil ifTrue:[
         self javaHomeHolder value: java_home
     ]
 
-    "Modified: / 27-07-2012 / 00:20:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 11:11:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+updateJavaHomeInfo
+    | home release info |
+
+    home := self javaHomeHolder value.
+    info := ''.
+    home isEmptyOrNil ifTrue:[ 
+        release := JavaRelease default.
+    ] ifFalse:[ 
+        home asFilename isDirectory ifTrue:[  
+            release := JavaRelease inDirectory: home.
+        ]
+    ].
+    release notNil ifTrue:[
+        info :='%1 (%2%3) ' bindWith: release name
+                                         with: (release jdkHome notNil ifTrue:[ 'JDK' ] ifFalse:[ 'JRE' ])
+                                         with: (release isSystem ifTrue:[ ', system' ] ifFalse:[ '' ]).
+        release isSystem ifTrue:[ 
+            info := info asText allUnderlined.
+        ].    
+    ].
+    self javaHomeInfoHolder value: info
+
+    "Created: / 09-12-2014 / 12:56:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 14:08:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaSettingsApplication methodsFor:'aspects'!
@@ -586,53 +605,54 @@
     <resource: #uiAspect>
 
     javaHomeHolder isNil ifTrue:[
-        javaHomeHolder := AspectAdaptor forAspect: #javaHome.
-        javaHomeHolder subjectChannel: self javaReleaseHolder.
-        javaHomeHolder onChangeSend:#updateModifiedChannel to:self
+        javaHomeHolder := ValueHolder with: Java release javaHome.
+        javaHomeHolder onChangeSend: #updateModifiedChannel to: self.
+        javaHomeHolder onChangeSend: #updateJavaHomeInfo to: self.  
     ].
     ^ javaHomeHolder.
 
     "Created: / 27-07-2012 / 00:06:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 12:57:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaReleaseHolder
-    <resource: #uiAspect>
-
-    javaReleaseHolder isNil ifTrue:[
-        javaReleaseHolder := Java release asValue.
-        javaReleaseHolder onChangeSend:#updateModifiedChannel to:self.
-    ].
-    ^ javaReleaseHolder.
-
-    "Modified: / 27-07-2012 / 18:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 06-02-2013 / 08:30:00 / jv"
-!
-
-javaReleaseIsCustomHolder
+javaHomeInfoHolder
     <resource: #uiAspect>
 
-    javaReleaseIsCustomHolder isNil ifTrue:[
-        javaReleaseIsCustomHolder := AspectAdaptor forAspect: #isCustom.
-        javaReleaseIsCustomHolder subjectChannel: self javaReleaseHolder
+    "automatically generated by UIPainter ..."
+
+    "*** the code below creates a default model when invoked."
+    "*** (which may not be the one you wanted)"
+    "*** Please change as required and accept it in the browser."
+    "*** (and replace this comment by something more useful ;-)"
+
+    javaHomeInfoHolder isNil ifTrue:[
+        javaHomeInfoHolder := ValueHolder new.
+"/ if your app needs to be notified of changes, uncomment one of the lines below:
+"/       javaHomeInfoHolder addDependent:self.
+"/       javaHomeInfoHolder onChangeSend:#javaHomeInfoHolderChanged to:self.
     ].
-    ^ javaReleaseIsCustomHolder.
-
-    "Created: / 27-07-2012 / 00:07:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    ^ javaHomeInfoHolder.
 !
 
-javaReleaseList
+javaHomeList
     <resource: #uiAspect>
 
+    ^ [
+        | homesAndReleases |    
 
-    javaReleaseList isNil ifTrue:[
-        javaReleaseList := JavaRelease allForCurrentOperatingSystem asList.
-        (javaReleaseList includesIdentical: JavaRelease system) ifFalse:[ 
-            javaReleaseList add: JavaRelease system.
+        homesAndReleases := OrderedCollection withAll: JavaRelease available .
+        (homesAndReleases includesIdentical: JavaRelease system) ifFalse:[ 
+            homesAndReleases add: JavaRelease system.
+        ].
+        (homesAndReleases anySatisfy: [:release | release javaHome = self javaHomeHolder value ]) ifFalse:[ 
+            homesAndReleases addFirst: self javaHomeHolder value.
         ].
-    ].
-    ^ javaReleaseList.
+        homesAndReleases addLast: ((resources string:'Autodetect') asText colorizeAllWith: Color gray).
+        homesAndReleases.
+    ]
 
-    "Modified (format): / 08-12-2014 / 00:38:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 09-12-2014 / 11:22:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 14:06:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 jdkBundleHolder
@@ -697,35 +717,42 @@
     userBundleHolder := something.
 ! !
 
+!JavaSettingsApplication methodsFor:'hooks'!
+
+postBuildJavaHomeFIeld: aComboBox
+    aComboBox menuSelectAction: [ :value |
+        value = (resources string:'Autodetect') ifTrue:[
+            aComboBox field contents: ''
+        ] ifFalse:[ 
+            aComboBox field contents: (value isString ifTrue:[ value ] ifFalse:[ value javaHome ])
+        ]
+    ].
+    aComboBox field emptyFieldReplacementText: (resources string:'Autodetect')
+
+    "Modified: / 09-12-2014 / 14:04:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !JavaSettingsApplication methodsFor:'protocol'!
 
 basicReadSettings
-    | rel cpb |
+    | cpb |
+
 
-    rel := currentUserPrefs javaRelease.
-    (rel isNil and:[Java notNil]) ifTrue:[
-        rel := Java defaultRelease
-    ].
-    
-    self javaReleaseHolder value: rel.
+    self javaHomeHolder value: currentUserPrefs javaHome.
+    self updateJavaHomeInfo.
+
     cpb := Java classPathBundle.
     self userBundleHolder value: cpb user deepCopy.
     self packageBundleHolder value: cpb packages.
     self environmentBundleHolder value: cpb environment.
 
-    "Modified: / 11-11-2013 / 16:15:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 12:56:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 basicSaveSettings
-    | release |
-    release := self javaReleaseHolder value .
-    (release notNil and:[release ~~ JavaRelease system]) ifTrue:[
-        currentUserPrefs javaReleaseSelector:  self javaReleaseHolder value selector.
-    ] ifFalse:[
-        currentUserPrefs javaReleaseSelector: nil.
-    ].
+    currentUserPrefs javaHome:self javaHomeHolder value
 
-    "Modified: / 11-11-2013 / 16:06:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 12:43:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 helpFilename
@@ -741,33 +768,70 @@
 !JavaSettingsApplication methodsFor:'queries'!
 
 hasUnsavedChanges
-    "superclass AbstractSettingsApplication says that I am responsible to implement this method"
 
-    | prefRel setRel |
-
-    prefRel :=  currentUserPrefs javaRelease.  
-    setRel := self javaReleaseHolder value.
-
-    (setRel validateJavaHome: self javaHomeHolder value) ifFalse:[
-        self infoPanel
-            reset;
-            beWarning;
-            message: (resources string: 'JAVA_HOME is not valid');
-            show.
-        ^ false "/ Hack, this effectively disables the "Apply" button...
-    ] ifTrue:[
-        self infoPanel hide.
+    self validate ifFalse:[ 
+        ^ false "/ Effectively disables the 'Apply' button.
     ].
 
-    setRel == JavaRelease system ifTrue:[ setRel :=  nil ].
-    prefRel ~~ setRel ifTrue:[ ^ true ].
+    self javaHomeHolder value ~= currentUserPrefs javaHome ifTrue:[ ^ true ].
+
+    ^ false
+
+    "Modified: / 09-12-2014 / 12:42:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaSettingsApplication methodsFor:'validation'!
 
+validate
+    self validateJavaHome ifFalse:[ ^ false ].
+    self validationOK.
+    ^ true
 
+    "Created: / 09-12-2014 / 12:27:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+validateJavaHome    
+    | javaHome javaRelease |
 
+    javaHome := self javaHomeHolder value.
+    javaHome isEmptyOrNil ifTrue:[ 
+        ^ true.
+    ].
+    javaHome asFilename exists ifFalse:[  
+        self validationError: (resources string: 'Java home does not exist').
+        ^ false.
+    ].
+    javaHome asFilename isDirectory ifFalse:[  
+        self validationError: (resources string: 'Java home is not a directory').
+        ^ false.
+    ].
+    javaRelease := JavaRelease inDirectory: javaHome.
+    javaRelease isNil ifTrue:[ 
+        self validationError: (resources string: 'Cannot find JDK or JRE in specified java home').
+        ^ false
+    ].
+    ^ true
 
-    ^false
+    "Created: / 09-12-2014 / 12:19:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 09-12-2014 / 14:06:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
 
-    "Modified: / 11-11-2013 / 16:10:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+validationError:message
+    self infoPanel
+        reset;
+        beWarning;
+        message: message;
+        show.
+
+    "Created: / 09-12-2014 / 12:23:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+validationOK
+    self infoPanel
+        reset;
+        hide.
+
+    "Created: / 09-12-2014 / 12:26:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaSettingsApplication class methodsFor:'documentation'!
--- a/tools/tools.rc	Mon Dec 08 10:26:50 2014 +0000
+++ b/tools/tools.rc	Tue Dec 09 14:49:20 2014 +0000
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.5.0\0"
-      VALUE "ProductDate", "Mon, 08 Dec 2014 10:20:56 GMT\0"
+      VALUE "ProductDate", "Tue, 09 Dec 2014 14:46:49 GMT\0"
     END
 
   END