Solved

Shell help

Posted on 2015-01-27
5
73 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
weird behavior after adding color to bash prompt 4 72
Perl Write to Specific line in a file 15 76
AWS CLI issues with Tags 3 65
linux pull logs and export FTP 4 60
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now