944,107 Members | Top Members by Rank

Ad:
Jun 23rd, 2006
0

How to call Java classes/Methods from shell

Expand Post »
Hi all,

I am a new joinee in this forum. I am facing one problem.

How to call Java classes and methods from shell scripts?? i am using KSH.

Is it really possible to do that or not?

Response will be appreciated.

Thanks,
Girish Sharma
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
girish.sh is offline Offline
3 posts
since Jun 2006
Jun 23rd, 2006
0

Re: How to call Java classes/Methods from shell

The only java method you can call from a shell script is the main method
of a class, by starting that class with a java command line execution.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Jun 23rd, 2006
0

Shell Script exit status

Can we define exit status intereger values for our purpose except 0?

like can i set custom exit status messages:

"1" for error occured because of reason #1
"2" for error occured because of reason #2
...

Is there any document which displays all the exit status code values from 0-255?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
girish.sh is offline Offline
3 posts
since Jun 2006
Jun 23rd, 2006
0

Re: Shell Script exit status

Your exit status from your java program is whatever number you place
in the System.exit call. There is no standard exit code value other than
0 is successful and not 0 is an error. I would say you are probably pretty
safe using return codes between 50 and 200, just a personal guess. I
have never actually seen the jvm die with an error code other than 0, 1,
254, or 255.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: Writing to a FAT12 boot sector
Next Thread in Shell Scripting Forum Timeline: Shell script exit status





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC