I'm having trouble using jarjar from the command-line to combine a simple Scala program with the scala runtime-library.
jarjar correctly detects the dependency:
$ java -jar ~/Desktop/saug/jarjar-1.0.jar find jar BCT.jar scala-library.jar
/home/schani/Work/scala/bct/BCT.jar -> /home/schani/Work/scala/bct/scala-library.jar
Combining them doesn't work, however:
$ CLASSPATH=./scala-library.jar java -jar ~/Desktop/saug/jarjar-1.0.jar process rules.jjl BCT.jar BCTS.jar
The jar file that I get still depends on scala-library.jar. Whether or not I add the CLASSPATH variable makes no difference. My rules.jjl file looks like this:
keep BCT
What to do?
Using the java "-jar" option ignores the classpath. Try specifying the main class explicitly with a classpath, and omit "-jar":
java -cp ~/Desktop/saug/jarjar-1.0.jar:./scala-library.jar com.tonicsystems.jarjar.Main process rules.jjl BCT.jar BCTS.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With