| | |
How to call Java classes/Methods from shell
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
The only java method you can call from a shell script is the main method
of a class, by starting that class with a java command line execution.
of a class, by starting that class with a java command line execution.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Your exit status from your java program is whatever number you place
in the System.exit call. There is no standard exit code value other than
0 is successful and not 0 is an error. I would say you are probably pretty
safe using return codes between 50 and 200, just a personal guess. I
have never actually seen the jvm die with an error code other than 0, 1,
254, or 255.
in the System.exit call. There is no standard exit code value other than
0 is successful and not 0 is an error. I would say you are probably pretty
safe using return codes between 50 and 200, just a personal guess. I
have never actually seen the jvm die with an error code other than 0, 1,
254, or 255.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Similar Threads
- is it possible for PHP to call API written on java ? HELP (Java)
- Java Game Characteristics (Java)
- non-default Java classes how to import (Java)
- Viewing java classes (Java)
- Something showling my system down (hijackthis log incl) (Viruses, Spyware and other Nasties)
Other Threads in the Shell Scripting Forum
- Previous Thread: Writing to a FAT12 boot sector
- Next Thread: Shell script exit status
| Thread Tools | Search this Thread |






