Solved

Shell help

Posted on 2015-01-27
5
74 Views
Last Modified: 2015-02-16
Hi ,

I have a question . In my shell script is it possible to call the java program .(its a standalone code).

Eg.

#!/bin/bash
command1;
command2;
somecode.class #Java code
command3;
exit 0

Thanks
0
Comment
Question by:magento
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 40574837
Yes, you can call it the same way you call it from command prompt.
0
 
LVL 5

Author Comment

by:magento
ID: 40597767
Any sample please ?
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 40597806
Please look at below link on how to run java programs from command prompt:

http://introcs.cs.princeton.edu/java/15inout/linux-cmd.html
0
 
LVL 5

Author Comment

by:magento
ID: 40607122
Hi Omarfarid,

Thanks for your help , i havent tried the above. I will close the thread once i checked it.

Thanks
0
 
LVL 5

Author Closing Comment

by:magento
ID: 40613462
Worked as expected . Thanks
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Utilizing an array to gracefully append to a list of EmailAddresses
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question