I just recently installed JDK 7 as well as IntelliJ on my machine, and I haven't been able to build Kotlin because of the error below. Has anyone been able to fix this error?
Here’s the build log on my local machine, which is running Windows 8 and is using the JDK 7:
$ /c/apache-ant-1.9.3/bin/ant -f build.xml
Buildfile: d:Developmentkotlinbuild.xml
Trying to override old definition of task javac2
[echo] Use javac2 from Idea lib
clean:
[delete] Deleting directory d:Developmentkotlindist
init:
[mkdir] Created dir: d:Developmentkotlindistkotlinc
[mkdir] Created dir: d:Developmentkotlindistkotlinclib
[mkdir] Created dir: d:Developmentkotlindistkotlinclibtools
prepareDist:
[copy] Copying 4 files to d:Developmentkotlindistkotlincbin
[copy] Copying 10 files to d:Developmentkotlindistkotlinclicense
preloader:
[echo] Cleaning d:Developmentkotlin/dist/classes/preloader
[mkdir] Created dir: d:Developmentkotlindistclassespreloader
[javac2] Compiling 16 source files to d:Developmentkotlindistclassesprel
oader
[javac2] warning: [options] bootstrap class path not set in conjunction with
-source 1.6
[javac2] d:Developmentkotlincompilerpreloadersrcorgjetbrainsjetprelo
adingClassPreloadingUtils.java:19: warning: CompoundEnumeration is internal pro
prietary API and may be removed in a future release
[javac2] import sun.misc.CompoundEnumeration;
[javac2] ^
[javac2] d:Developmentkotlincompilerpreloadersrcorgjetbrainsjetprelo
adingClassPreloadingUtils.java:120: warning: CompoundEnumeration is internal pr
oprietary API and may be removed in a future release
[javac2] return new CompoundEnumeration<URL>(new Enumerat
ion[0]);
[javac2] ^
[javac2] 3 warnings
[javac2] Added @NotNull assertions to 0 files
[jar] Building jar: d:Developmentkotlindistkotlinclibkotlin-preloade
r.jar
builtins:
[echo] Cleaning d:Developmentkotlin/dist/builtins
[mkdir] Created dir: d:Developmentkotlindistbuiltins
BUILD FAILED
d:Developmentkotlinbuild.xml:275: java.io.IOException: Cannot run program “c:
Javajdk1.7.0_51jrebinjava.exe”: CreateProcess error=206, The filename or ex
tension is too long
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Jav
a13CommandLauncher.java:41)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=206, The filename or extensi
on is too long
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
at java.lang.ProcessImpl.start(ProcessImpl.java:136)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
… 24 more
Total time: 6 seconds
Regards,
Philip Laureano