How to execute java file using shell script

How to execute java file using shell script?

+5
source share
3 answers

If it is packed as a jar:

java -jar jarfile.jar
+4
source

If this is a class file:

java myClassFile

If this is a jar file:

java -jar myJarFile.jar

Cm:

+3
source

java com.foo.Boo

+1
source

All Articles