Execute java class from Unix shell script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skamitin
    New Member
    • Feb 2008
    • 1

    Execute java class from Unix shell script

    I had written a shell script, now i need write commands in this script to run the java class so that when that script is run it also runs the java class.


    Thanks in Advance
    -Amit
  • Laharl
    Recognized Expert Contributor
    • Sep 2007
    • 849

    #2
    Assuming the class has been compiled into bytecode (the .class file), you should be able to run it like any other command with the java command. The java command (to my knowledge) does require the .class to be in the current directory, though...Maybe a .jar?

    Comment

    Working...