Solved

Shell help

Posted on 2015-01-27
5
92 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

623 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