Solved

Shell help

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ion my script output i have multiple cvs files 3 39
get remote physical servers and platforms 5 57
Linux  Script File Attributes 5 75
Shell script issue 4 53
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
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…

685 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