07-16-2009
According to the javadoc, Runtime.exec() returns a Process object that allows you to get information about the process. I found the exitValue() method and that is likely what you need.
Process (Java Platform SE 6))
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Suppose I have a script which is monitoring a directory
whenever a file drops in that directory,it sends alert
say I want to write a return code for the above script
which on successful execution of script gives a return value
Based on return code , I want to do initiate some jobs in other... (1 Reply)
Discussion started by: abhib45
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I know how to read a return code after executing a single command.
"echo $?". But I do not know how to sum the return code for a group of commands.
If I string 3 commands together and I do an echo $? all I get is the retunr code for the last command. Example below:
... (3 Replies)
Discussion started by: z1tt45uuprs7
3 Replies
3. Shell Programming and Scripting
How to find out whether the command I executed is successful or unsuccessful(at commandlinet)
Eg:
say i execute the following command at command line
rm *
How do i find out whether my previous command is a success or failure.
Thankyou.
Best Regards,
Ram. (1 Reply)
Discussion started by: ramky79
1 Replies
4. UNIX for Dummies Questions & Answers
Hi ,
i have written a shell scipt to call a procedure and get the value back from procedure.But i am facing the issue like
#!/bin/sh
returnedvalue=`sqlplus -s userid/pass<<EOF
set serveroutput on;
exec pass($1)
set serveroutput off;
EXIT;
EOF`
flag=`echo $returnedvalue `
echo "$flag"... (2 Replies)
Discussion started by: ravi214u
2 Replies
5. Shell Programming and Scripting
Hi,
I have a unix shell script which is launching multiple java processes by calling a java class in a loop, but each time with a different set of parameters.
Now I have to use the return code from each process in the script later.
but how do i obtain the return code from each process... (1 Reply)
Discussion started by: rama354
1 Replies
6. Shell Programming and Scripting
Hi All,
My shell script will call a java component with some arguments , the java component returns a string value to the shell script. How to assign the return value to the shell variable.
Here is the sample code.
In my shell script i am calling the java as fallows.
--exporting... (1 Reply)
Discussion started by: rajeshorpu
1 Replies
7. Shell Programming and Scripting
Hello Everybody,
thanks in advance for spending some time in my problem.
My problem is this:
I want to call a java-Programm out of my shell skript, check if die return code is right, and split the output to the normal output and into a file.
The following code doesn't work right, because in... (2 Replies)
Discussion started by: danifunny
2 Replies
8. Shell Programming and Scripting
Based on the earlier thread , I made the change for the oracle sequence next val from .sh script ,
X=$(sqlplus -s user/pswd << eod
set heading off
select etl.batch_sq.nextval from dual;
eod)
when I echo to check the value
echo Batch_Id_$X
I get the following result :
Batch_Id_ 69... (3 Replies)
Discussion started by: Shanks
3 Replies
9. Shell Programming and Scripting
Hi,
Does anyone here can guide me to understand how is return code works in a parent-child relation with a simple example?
I have a request to build the script with return code in a child script, but i want to understand how does child script can return a code to the parent, stated if its... (4 Replies)
Discussion started by: khchong
4 Replies
10. Programming
Hi All,
Can anyone help me for knowing the java best side forums. where i will get a quick responce like here , as i am having lot of question.
Thanks (1 Reply)
Discussion started by: aish11
1 Replies
LEARN ABOUT OSX
jvisualvm
jvisualvm(1) General Commands Manual jvisualvm(1)
NAME
jvisualvm - Java Virtual Machine Monitoring, Troubleshooting, and Profiling Tool
SYNOPSIS
jvisualvm [ options ]
PARAMETERS
Options, if used, should follow immediately after the command name. Options may be in any order. For a discussion of parameters that apply
to a specific option, see OPTIONS below.
DESCRIPTION
Java VisualVM is an intuitive graphical user interface that provides detailed information about Java technology-based applications (Java
applications) while they are running on a given Java Virtual Machine (JVM(*)). The name Java VisualVM comes from the fact that Java Visu-
alVM provides information about the JVM software visually.
Java VisualVM combines several monitoring, troubleshooting, and profiling utilities into a single tool. For example, most of the function-
ality offered by the standalone tools jmap, jinfo, jstat and jstack have been integrated into Java VisualVM. Other functionalities, such as
some of those offered by the JConsole tool, can be added as optional plug-ins.
OPTIONS
The following option is possible when you launch Java VisualVM.
-J<jvm_option>
Pass this <jvm_option> to the JVM software.
USAGE
Java VisualVM is useful to Java application developers to troubleshoot applications and to monitor and improve the applications' perfor-
mance. Java VisualVM can allow developers to generate and analyse heap dumps, track down memory leaks, perform and monitor garbage collec-
tion, and perform lightweight memory and CPU profiling. Plug-ins also exist that expand the functionality of Java VisualVM. For example,
most of the functionality of the JConsole tool is available via the MBeans Tab and JConsole Plug-in Wrapper plug-ins. You can choose from a
catalog of standard Java VisualVM plug-ins by selecting 'Tools' | 'Plugins' in the Java VisualVM menus.
Start Java VisualVM with the following command:
% jvisualvm <options>
SEE ALSO
For more details about Java VisualVM see the following pages.
o Java VisualVM developers' site @
https://visualvm.dev.java.net
o Java VisualVM in Java SE platform documentation @
http://java.sun.com/javase/6/docs/technotes/guides/visualvm/index.html
(* The terms "Java Virtual Machine" and "JVM" mean a Virtual Machine for the Java platform.)
26 Mar 2008 jvisualvm(1)