Quantcast
Channel: Run a JAR file from the command line and specify classpath - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by tars for Run a JAR file from the command line and specify classpath

$
0
0

You can do these in unix shell:

java -cp MyJar.jar:lib/* com.somepackage.subpackage.Main

You can do these in windows powershell:

java -cp "MyJar.jar;lib\*" com.somepackage.subpackage.Main

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>