Comments (3)
This is a Java version mismatch. Could you use JRE/Java8 instead of the outdated Java7? This will fix the problem.
It seems that you're either
- having a version difference between
javac
andjava
in your shell - or one of your declared dependencies was compiled with java8 and your using java7 in your shell.
Since kscript does not ship any compiled code, it's nothing I could actually fix.
If this does not help you to solve your problem, could you provide the test.kts, so that I can have a more in-depth look?
from kscript.
Hm, I'm on java version 1.8.0_91. There is another library that is working fine:
https://github.com/andrewoma/kotlin-script
I'l just use that,
from kscript.
Would you mind running
echo $JAVA_HOME
$JAVA_HOME/bin/javac -version
java -version
javac -version
in your terminal and attaching the result to this ticket?
I could imagine a version mismatch in your setup since kotlinc is using JAVA_HOME to locate the compiler, but kscript
was just running java
from your PATH. If now the latter is v1.7 and the former pointing to an 1.8 installation, it would explain your problem.
The problem has been solved (see commit above) and simply reinstalling kscript with curl as indicated in the READM.md should fix it.
from kscript.
Related Issues (20)
- [kscript] [ERROR] Error executing command HOT 1
- Create kscript package for scoop HOT 7
- Don't work @file:Import("absolute/path/to/myutils.kt") HOT 2
- Basic hello world example does not work with interpreter HOT 1
- Allow setting an alternate kotlinc binary (or use kotlinc-jvm)
- Add an option to suppress final error output HOT 10
- [Windows] path to kotlinc not quoted HOT 4
- How to load text file via relative path? HOT 2
- kscript --interactive does not resolve the variables defined inside .kts file HOT 1
- kscript environment variable substitution for repositories no longer works HOT 6
- Does not work with Kotlin 1.9.0 HOT 12
- Can kscript used in Android project written in kotlin HOT 1
- Can you change kscript's included java version? HOT 1
- [question] daemon concept HOT 4
- Does not support spaces in KOTLIN_HOME variable.
- --package is broken in 4.2.3 - doesn't include stuff in local dependencies
- Fresh checkout of repo causes failure on `gradle run` and other ways of invoking `kscript` fail for the same reason
- kscript downloading Kotlin Native jars during dependency resolution - why? HOT 1
- Example in README with @file:Import fails
- Use version 4.2.3 on Dockerfile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kscript.