How to read java exit code from a shell script...

Java Class class Hello{ public static void main(String args[]){ System.out.println("Hello world!!!!"); System.exit(10); } } Shell script #!/bin/bash java Hello exitValue=$? echo "Exit Code : " $exitValue Output Hello world!!!! Exit code : 10
sumedha's picture

How to read java exit code

Same can be done from a windows bat file as follows.. echo off java Hello echo %ERRORLEVEL%
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)