Java 7, Gradle 1.4, Windows VM Initialization Fails Possibly Due to file.separator=\


(Geoffrey Lane) #1

Running ‘gradle test’ with Java 1.7.0_09 works. Versions after _09 do on Windows fail because of the file.separator being set to “”. I think this is a JVM issue (and I submitted a bug to Oracle), but Gradle could work it out by not explicitly setting that property. Is there a way to prevent it from being set?

Starting process ‘Gradle Worker 1’. Working directory: C:\Users\glane\projects\bus Command: C:\Program Files\Java\jdk1.7.0_13\bin\java.exe -Dawt.toolkit=sun.awt.windows.WToolkit -Dfile.encoding.pkg=sun.io -Dfile.separator=\ -Dhttp.keepAlive=true -Djacoco=true -Djava.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment -Djava.awt.printerjob=sun.awt.windows.WPrinterJob -Djava.class.path=C:/Users/glane/projects/bus/gradle/wrapper/gradle-wrapper.jar -Djava.class.version=51.0 -Djava.endorsed.dirs=C:\Program Files\Java\jdk1.7.0_13\jre\lib\endorsed -Djava.ext.dirs=C:\Program Files\Java\jdk1.7.0_13\jre\lib\ext;C:\Windows\Sun\Java\lib\ext -Djava.home=C:\Program Files\Java\jdk1.7.0_13\jre -Djava.io.tmpdir=C:\cygwin\tmp\ -Djava.library.path=C:\Program Files\Java\jdk1.7.0_13\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\gnuwin32\bin;C:\Program Files\Java\jdk1.7.0_13\bin;C:\Windows\SYSTEM32;C:\Windows;C:\Windows\SYSTEM32\WBEM;C:\Program Files\ThinkPad\Bluetooth Software;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\QuickTime\QTSystem;C:\PrograC;C:\cygwin\Program Files (x86)\Graphviz 2.28\bin;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\TortoiseHg;C:\Users\glane\devtools\groovy-2.1.0\bin;C:\Users\glane\devtools\gradle-1.4\bin;C:\Users\glane\devtools\grails-2.1.0\bin;C:\Users\glane\devtools\play-2.0.4;C:\Users\glane\devtools\scala-2.10.0\bin;C:\Users\glane\devtools\sbt-0.12.2\bin;. -Djava.runtime.name=Java™ SE Runtime Environment -Djava.runtime.version=1.7.0_13-b20 -Djava.security.manager=jarjar.org.gradle.process.internal.child.BootstrapSecurityManager -Djava.specification.name=Java Platform API Specification -Djava.specification.vendor=Oracle Corporation -Djava.specification.version=1.7 -Djava.vendor=Oracle Corporation -Djava.vendor.url=http://java.oracle.com/ -Djava.vendor.url.bug=http://bugreport.sun.com/bugreport/ -Djava.version=1.7.0_13 -Djava.vm.info=mixed mode -Djava.vm.name=Java HotSpot™ 64-Bit Server VM -Djava.vm.specification.name=Java Virtual Machine Specification -Djava.vm.specification.vendor=Oracle Corporation -Djava.vm.specification.version=1.7 -Djava.vm.vendor=Oracle Corporation -Djava.vm.version=23.7-b01 -Djna.boot.library.path=C:\Users\glane.gradle\native\jna\win32-amd64 -Dline.separator=

-Dorg.gradle.appname=gradlew -Dorg.jboss.logging.provider=slf4j -Dos.arch=amd64 -Dos.name=Windows 7 -Dos.version=6.1 -Dpath.separator=; -Dsun.arch.data.model=64 -Dsun.boot.class.path=C:\Program Files\Java\jdk1.7.0_13\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_13\jre\classes -Dsun.boot.library.path=C:\Program Files\Java\jdk1.7.0_13\jre\bin -Dsun.cpu.endian=little -Dsun.cpu.isalist=amd64 -Dsun.desktop=windows -Dsun.io.unicode.encoding=UnicodeLittle -Dsun.java.command=org.gradle.wrapper.GradleWrapperMain --info test -Dsun.java.launcher=SUN_STANDARD -Dsun.jnu.encoding=Cp1252 -Dsun.management.compiler=HotSpot 64-Bit Tiered Compilers -Dsun.os.patch.level=Service Pack 1 -Duser.country=US -Duser.dir=C:\Users\glane\projects\bus -Duser.home=C:\Users\glane -Duser.language=en -Duser.name=glane -Duser.script -Duser.timezone=America/New_York -Duser.variant -javaagent:C:\Users\glane.gradle\caches\artifacts-23\filestore\org.jacoco\org.jacoco.agent\0.6.2.201302030002\jar\43d5e00b1340f626efc4e39ed30d32f0869e0e43\org.jacoco.agent-0.6.2.201302030002-runtime.jar=destfile=C:\Users\glane\projects\bus\build/coverage-results/jacoco.exec,sessionid=HSServ,append=false,excludes=org.ifxforum.* -XX:MaxPermSize=128m -Xms128m -Xmx512m -Dfile.encoding=Cp1252 -ea -cp C:\Users\glane.gradle\caches\1.4\workerMain\gradle-worker.jar jarjar.org.gradle.process.internal.launcher.GradleWorkerMain An attempt to initialize for well behaving parent process finished. Successfully started process ‘Gradle Worker 1’ Error occurred during initialization of VM java.lang.ExceptionInInitializerError

at java.lang.Runtime.loadLibrary0(Runtime.java:841)

at java.lang.System.loadLibrary(System.java:1084)

at java.lang.System.initializeSystemClass(System.java:1145) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0

at java.lang.String.charAt(String.java:658)

at java.io.Win32FileSystem.(Win32FileSystem.java:40)

at java.io.WinNTFileSystem.(WinNTFileSystem.java:37)

at java.io.FileSystem.getFileSystem(Native Method)

at java.io.File.(File.java:156)

at java.lang.Runtime.loadLibrary0(Runtime.java:841)

at java.lang.System.loadLibrary(System.java:1084)

at java.lang.System.initializeSystemClass(System.java:1145)


(Dmitrijs Balcers) #2

Anyone solved this problem?


(Venkata Dharma Chand B.) #3

I got the same issue when I am building my application using gradle. Please help me in resolving this issue.


(Peter Niederwieser) #4

I recommend to build with a recent bugfix release of Java 7. That will likely solve the problem.