H
horos11
All,
Much to my dismay, it doesn't look like the exit code with java
(System.exit()) is hooked up with the OS. ie - if I say:
public class samp
{
public static void main(String[] args)
{
System.exit(256);
}
}
compile and run this as in:
javac samp.java
java samp
and then check the error status from the shell, I get:
echo $? // prints '0'
why is this? Is there a way to get the sun JVM to set $? on failure?
Else, how do you know the program failed, from a shell standpoint?
Ed
Much to my dismay, it doesn't look like the exit code with java
(System.exit()) is hooked up with the OS. ie - if I say:
public class samp
{
public static void main(String[] args)
{
System.exit(256);
}
}
compile and run this as in:
javac samp.java
java samp
and then check the error status from the shell, I get:
echo $? // prints '0'
why is this? Is there a way to get the sun JVM to set $? on failure?
Else, how do you know the program failed, from a shell standpoint?
Ed