Scala runner doesn't do executable jars
See original GitHub issueCompiler version
3.0.0
Minimized code
➜ snips sdk use scala 2.13.6
Using scala version 2.13.6 in this shell.
➜ snips scalac -d hi.jar hi.scala
➜ snips scala hi.jar
hello, world
➜ snips sdk use scala 3.0.0
Using scala version 3.0.0 in this shell.
➜ snips scalac -d hi.jar hi.scala
➜ snips scala hi.jar
Error: Could not find or load main class hi.jar
Caused by: java.lang.ClassNotFoundException: hi.jar
➜ snips scala -classpath hi.jar Main
hello, world
Output
Error: Could not find or load main class hi.jar
Expectation
Scala runner creates and runs an executable jar. It looks like it doesn’t create META-INF/MANIFEST.MF
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Problem creating an executable jar from scala file
I'm tryign to export my project as a jar with IntelliJ 9.0. My project compiles and runs with no problem in Intellij, but...
Read more >How to deploy a single, executable Jar file (sbt-assembly)
A JAR file created by SBT can be run by the Scala interpreter, but not the Java interpreter. This is because class files...
Read more >How to run a Jar file | TechTarget - TheServerSide.com
Steps to run a JAR file on Windows, Mac or Linux · Verify that Java is installed on your computer · Confirm the...
Read more >How to Make Executable JAR file in Eclipse IDE - Java - Java67
After creating an executable JAR file, you can follow these steps to run the Java program ... All you need to do is...
Read more >Java Rules | Bazel
Non-executable binaries collect transitive runtime Java dependencies into a deploy jar, but cannot be executed directly. No wrapper script is created if this ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Overlaps with #13081, so either make sure to coordinate with @BarkingBad.
Yes, we discussed whether we should go Python-style or tolerate
@main
in scripts earlier. The argument for@main
was not only simplicity but also the ability to accept command arguments in a natural way. Another argument was that scripts and programs ideally should be the same thing; we should strive to avoid differentiating between the two. Overall we got the consensus that@main
in scripts is fine.