# Failure at kotlin-compiler-embeddable while running mvn install on Mac OS X Sierra

**URL:** <https://discuss.kotlinlang.org/t/failure-at-kotlin-compiler-embeddable-while-running-mvn-install-on-mac-os-x-sierra/3280>\
**Category:** Uncategorized\
**Created:** [June 13, 2017, 8:01am UTC](https://discuss.kotlinlang.org/t/failure-at-kotlin-compiler-embeddable-while-running-mvn-install-on-mac-os-x-sierra/3280 "2017-06-13T08:01:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JPinkney](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@JPinkney](https://discuss.kotlinlang.org/u/JPinkney)\
**Post date:** [June 13, 2017, 8:01am UTC](https://discuss.kotlinlang.org/t/failure-at-kotlin-compiler-embeddable-while-running-mvn-install-on-mac-os-x-sierra/3280/1 "2017-06-13T08:01:03Z")

</div>

There seems to be an error entitled “There was an error in the forked process” when running mvn install on Mac OS X Sierra

[INFO]  
[INFO] Building kotlin-compiler-embeddable 1.1-SNAPSHOT  
[INFO]  
[INFO]  
[INFO] — directory-maven-plugin:0.1:highest-basedir (directories) @ kotlin-compiler-embeddable —  
[INFO] Highest basedir set to: /Users/joshpinkney/Desktop/kotlin/libraries  
[INFO]  
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ kotlin-compiler-embeddable —  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joshpinkney/Desktop/kotlin/libraries/tools/kotlin-compiler-embeddable/src/main/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ kotlin-compiler-embeddable —  
[INFO] No sources to compile  
[INFO]  
[INFO] — kotlin-maven-plugin:1.1.2-4:compile (compile) @ kotlin-compiler-embeddable —  
[INFO] Kotlin Compiler version 1.1.2-4  
[WARNING] No sources found skipping Kotlin compile  
[INFO]  
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ kotlin-compiler-embeddable —  
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.  
[INFO] skip non existing resourceDirectory /Users/joshpinkney/Desktop/kotlin/libraries/tools/kotlin-compiler-embeddable/src/test/resources  
[INFO]  
[INFO] — maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ kotlin-compiler-embeddable —  
[INFO] Nothing to compile - all classes are up to date  
[INFO]  
[INFO] — kotlin-maven-plugin:1.1.2-4:test-compile (test-compile) @ kotlin-compiler-embeddable —  
[INFO] Kotlin Compiler version 1.1.2-4  
[INFO] Compiling Kotlin sources from [/Users/joshpinkney/Desktop/kotlin/libraries/tools/kotlin-compiler-embeddable/test/kotlin]  
[INFO] Module name is kotlin-compiler-embeddable  
[INFO] Overriding JDK home path with: /Library/Java/JavaVirtualMachines/jdk1.8.0\_25.jdk/Contents/Home  
[WARNING] Some JAR files in the classpath have the Kotlin Runtime library bundled into them. This may cause difficult to debug problems if there’s a different version of the Kotlin Runtime library in the classpath. Consider removing these libraries from the classpath or use ‘-Xskip-runtime-version-check’ to suppress this warning  
[WARNING] /Users/joshpinkney/Desktop/kotlin/libraries/tools/kotlin-compiler/target/kotlin-compiler-1.1-SNAPSHOT.jar: (-1, -1) Library has Kotlin runtime bundled into it  
[INFO]  
[INFO] — maven-surefire-plugin:2.16:test (default-test) @ kotlin-compiler-embeddable —  
[INFO] Surefire report directory: /Users/joshpinkney/Desktop/kotlin/libraries/tools/kotlin-compiler-embeddable/target/surefire-reports

T E S T S

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]  
[INFO] Reactor Summary:  
[INFO]  
[INFO] Kotlin … SUCCESS [0.705 s]  
[INFO] kotlin-compiler … SUCCESS [1.321 s]  
[INFO] native-platform … SUCCESS [0.221 s]  
[INFO] kotlin-compiler-embeddable … FAILURE [6.889 s]  
[INFO] kotlin-compiler-client-embeddable … SKIPPED  
[INFO] kotlin-compiler-client-embeddable-test … SKIPPED  
[INFO] kotlin-maven-plugin … SKIPPED  
[INFO] kotlin-compiler-runner … SKIPPED  
[INFO] kotlin-daemon-client … SKIPPED  
[INFO] kotlin-build-common-test … SKIPPED  
[INFO] kotlin-osgi-bundle … SKIPPED  
[INFO] kotlin-archetypes … SKIPPED  
[INFO] kotlin-archetype-jvm … SKIPPED  
[INFO] kotlin-archetype-js … SKIPPED  
[INFO] idl2k … SKIPPED  
[INFO] kotlin-annotation-processing … SKIPPED  
[INFO] kotlin-annotation-processing-maven … SKIPPED  
[INFO] kotlin-maven-allopen … SKIPPED  
[INFO] kotlin-maven-noarg … SKIPPED  
[INFO] kotlin-sam-with-receiver-compiler-plugin … SKIPPED  
[INFO] kotlin-source-sections-compiler-plugin … SKIPPED  
[INFO] kotlin-script-util … SKIPPED  
[INFO] kotlin-android-extensions … SKIPPED  
[INFO] kotlin-maven-plugin-test … SKIPPED  
[INFO] annotation-processor-example … SKIPPED  
[INFO] kotlin-java-example … SKIPPED  
[INFO] js-example … SKIPPED  
[INFO] kotlin-js-library-example … SKIPPED  
[INFO] browser-example … SKIPPED  
[INFO] browser-example-with-library … SKIPPED  
[INFO] kotlin-jsr223-local-example … SKIPPED  
[INFO] kotlin-jsr223-daemon-local-eval-example … SKIPPED  
[INFO]  
[INFO] BUILD FAILURE  
[INFO]  
[INFO] Total time: 10.152 s  
[INFO] Finished at: 2017-06-11T21:50:20-04:00  
[INFO] Final Memory: 41M/609M  
[INFO]  
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project kotlin-compiler-embeddable: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test failed: There was an error in the forked process  
[ERROR] java.lang.UnsupportedClassVersionError: org/jetbrains/kotlin/compiler/embeddable/CompilerSmokeTest : Unsupported major.minor version 52.0  
[ERROR]   
at java.lang.ClassLoader.defineClass1(Native Method)  
[ERROR]   
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)  
[ERROR]   
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)  
[ERROR]   
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)  
[ERROR]   
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)  
[ERROR]   
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)  
[ERROR]   
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)  
[ERROR]   
at java.security.AccessController.doPrivileged(Native Method)  
[ERROR]   
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)  
[ERROR]   
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)  
[ERROR]   
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)  
[ERROR]   
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)  
[ERROR]   
at org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)  
[ERROR]   
at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)  
[ERROR]   
at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:206)  
[ERROR]   
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:103)  
[ERROR]   
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)  
[ERROR]   
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)  
[ERROR]   
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)  
[ERROR]  
[ERROR] → [Help 1]  
[ERROR]  
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.  
[ERROR] Re-run Maven using the -X switch to enable full debug logging.  
[ERROR]  
[ERROR] For more information about the errors and possible solutions, please read the following articles:  
[ERROR] [Help 1] [PluginExecutionException - Apache Maven - Apache Software Foundation](http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException)  
[ERROR]  
[ERROR] After correcting the problems, you can resume the build with the command  
[ERROR] mvn -rf :kotlin-compiler-embeddable

---

<div class="post-metadata">

**Author:** ![yole](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/yole/32/1425_2.png) [@yole](https://discuss.kotlinlang.org/u/yole)\
**Post date:** [June 13, 2017, 5:25pm UTC](https://discuss.kotlinlang.org/t/failure-at-kotlin-compiler-embeddable-while-running-mvn-install-on-mac-os-x-sierra/3280/2 "2017-06-13T17:25:40Z")

</div>

Please make sure that the JAVA\_HOME environment variable points to a Java 8 installation on your machine.

---

<div class="post-metadata">

**Author:** ![JPinkney](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@JPinkney](https://discuss.kotlinlang.org/u/JPinkney)\
**Post date:** [June 15, 2017, 12:12am UTC](https://discuss.kotlinlang.org/t/failure-at-kotlin-compiler-embeddable-while-running-mvn-install-on-mac-os-x-sierra/3280/3 "2017-06-15T00:12:31Z")

</div>

I’ve just checked it out and all my env variables seem to be working. Here is the output when testing them. Honestly at this point I would switch to a VM with any OS if I could get that working. I’ve been trying for about 2 weeks to get it to work on fedora and os x

> Josh-PC:surefire-reports joshpinkney$ echo $JDK\_16  
> /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home  
> Josh-PC:surefire-reports joshpinkney$ echo $JDK\_17  
> /Library/Java/JavaVirtualMachines/jdk1.7.0\_80.jdk/Contents/Home  
> Josh-PC:surefire-reports joshpinkney$ echo $JDK\_18  
> /Library/Java/JavaVirtualMachines/jdk1.8.0\_25.jdk/Contents/Home  
> Josh-PC:surefire-reports joshpinkney$ echo $JAVA\_HOME  
> /Library/Java/JavaVirtualMachines/jdk1.8.0\_25.jdk/Contents/Home

This is what I get in org.jetbrains.kotlin.compiler.embeddable.CompilerSmokeTest.txt

* * *

## Test set: org.jetbrains.kotlin.compiler.embeddable.CompilerSmokeTest

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.408 sec \<\<\< FAILURE! - in org.jetbrains.kotlin.compiler.embeddable.CompilerSmokeTest  
testSmoke(org.jetbrains.kotlin.compiler.embeddable.CompilerSmokeTest) Time elapsed: 0.311 sec \<\<\< FAILURE!  
java.lang.AssertionError: compilation failed:  
Exception in thread “main” java.lang.UnsupportedClassVersionError: org/jetbrains/kotlin/cli/common/CLICompiler : Unsupported major.minor version 52.0  
at java.lang.ClassLoader.defineClass1(Native Method)  
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)  
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)  
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)  
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)  
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)  
at java.lang.ClassLoader.defineClass1(Native Method)  
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)  
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)  
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)  
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)  
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)  
expected:\<0\> but was:\<1\>  
at org.junit.Assert.fail(Assert.java:88)  
at org.junit.Assert.failNotEquals(Assert.java:743)  
at org.junit.Assert.assertEquals(Assert.java:118)  
at kotlin.test.junit.JUnitAsserter.assertEquals(JUnitSupport.kt:23)  
at kotlin.test.AssertionsKt\_\_AssertionsKt.assertEquals(Assertions.kt:56)  
at kotlin.test.AssertionsKt.assertEquals(Unknown Source)  
at org.jetbrains.kotlin.compiler.embeddable.CompilerSmokeTest.testSmoke(CompilerEmbeddableSmokeTests.kt:49)
