Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a java program(main method ) from a shell script

 
Srivatsan Shyam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a requirement wherein I need to call a java program from the shell script. I am a java developer and have no idea on shell scripting. Can anyone out there please give me the exact code which I can use for my purpose. I request and appreciate any immediate help.

P.S- The shell script will inturn be called from an autosys .jil files.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To invoke a Java class, you'd use...

java ClassName

Same as on Windows, if that's what you're used to. Now, all the other stuff around it -- that might be harder!
 
Srivatsan Shyam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest Friedman-Hill wrote:To invoke a Java class, you'd use...

java ClassName

Same as on Windows, if that's what you're used to. Now, all the other stuff around it -- that might be harder!





HI,

Thanks for the reply. But as I have no idea on shell scripting, I would be really helpful if you give me the exact code I should use.

Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shell scripting is a useful thing to know, at least the basics of it. Start here: Bash Guide for Beginners
 
Srivatsan Shyam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Shell scripting is a useful thing to know, at least the basics of it. Start here: Bash Guide for Beginners



Thank You.....that site is cool.......
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic