aspose file tools*
The moose likes Linux / UNIX and the fly likes Calling a java program(main method ) from a shell script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Calling a java program(main method ) from a shell script" Watch "Calling a java program(main method ) from a shell script" New topic
Author

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

Srivatsan Shyam
Greenhorn

Joined: Feb 11, 2009
Posts: 3
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

Joined: Jul 08, 2003
Posts: 24168
    
  30

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!


[Jess in Action][AskingGoodQuestions]
Srivatsan Shyam
Greenhorn

Joined: Feb 11, 2009
Posts: 3
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
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
Shell scripting is a useful thing to know, at least the basics of it. Start here: Bash Guide for Beginners


Ping & DNS - updated with new look and Ping home screen widget
Srivatsan Shyam
Greenhorn

Joined: Feb 11, 2009
Posts: 3
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.......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a java program(main method ) from a shell script
 
Similar Threads
Callling a Script from a java program
ftp files to a different server
running java program from a shell script
How to call Java program main method from shell script
Running a Java Class from a Unix Shell Script