jar - Processbuilder-opening java script in linux -


back again, time java question. told how processbuilder run nonnative scripts (calling program run script), i've been trying run java script , have run couple problems. first off, should use .class or .jar? both of these can run i'm not sure 1 of them work better. , how execute them correctly? i've tried calling java (/usr/lib/jvm/java-6-openjdk/jre/bin/java) , giving filepath class file, doesn't seem work.

any ideas?

i agree sarnold in terms of .jar question. in terms of executing code using processbuilder, can execute .jar file long file contains main() method, , has main-class manifest header, can generated when .jar created. once have .jar created, you'd use command run .jar:

java -jar jar_file_name_here.jar

if have multiple main classes , want run specific one, use command this:

java -jar jar_name.jar com.main.class.package.path.here.someclassname

are trying execute elses .jar, or 1 of own want executed inside script? why using script, out of curiosity?


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -