Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 121
  • Last Modified:

Shell help

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
magento
Asked:
magento
  • 3
  • 2
1 Solution
 
omarfaridCommented:
Yes, you can call it the same way you call it from command prompt.
0
 
magentoAuthor Commented:
Any sample please ?
0
 
omarfaridCommented:
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
 
magentoAuthor Commented:
Hi Omarfarid,

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

Thanks
0
 
magentoAuthor Commented:
Worked as expected . Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now