[ https://issues.apache.org/jira/browse/GROOVY-8869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Klitos updated GROOVY-8869: --------------------------- Component/s: Groovy Console > Warning when JAVA_HOME points to NTFS symlink > --------------------------------------------- > > Key: GROOVY-8869 > URL: https://issues.apache.org/jira/browse/GROOVY-8869 > Project: Groovy > Issue Type: Bug > Components: Groovy Console, Groovysh > Affects Versions: 2.5.3 > Environment: Windows 7 Professional 64-bit (but probably applies to > all versions of Windows) > Reporter: Klitos > Priority: Minor > > It is typical (especially on Linux) to have a symlink to a minor version of > the JDK. On Windows, I've got jdk1.8 as a symlink to the latest bug-fix > release: > {noformat} > C:\Program Files\Java>dir > Volume in drive C is OSDisk > Volume Serial Number is 3A80-142D > Directory of C:\Program Files\Java > 06/11/2018 09:36 <DIR> . > 06/11/2018 09:36 <DIR> .. > 06/11/2018 09:36 <SYMLINKD> jdk1.8 [jdk1.8.0_192] > 17/10/2018 16:41 <DIR> jdk1.8.0_192 > {noformat} > > When I start groovysh.bat (or groovysh.exe) I get this startup message: > {noformat} > C:\Program Files\Java>groovysh > warning: JAVA_HOME points to a nonexistent location > Groovy Shell (2.5.3, JVM: 1.8.0_192) > Type ':help' or ':h' for help.{noformat} > Even worse, groovyconsole does not start at all. > On the other hand, although it fails with symlinks, it works with NTFS > junctions. > Looking at the source, it appears to be a problem with the stat function, > called from jst_fileExists, which is called from getJavaHomeFromEnvVar() in > [https://github.com/codehaus/groovy-native-launcher/blob/master/source/jvmstarter.c] > There are other ways to find if a file exists on windows that don't use stat. -- This message was sent by Atlassian JIRA (v7.6.3#76005)