Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have done my first java application and it was successfully finished and getting output in netbeans. I had also return a int value using
Java
System.exit(value)
method. It is working in development environment as i have got the Java Result. But when i execute the jar file in command line, nothing will happen. It just comes into the line with out any error.

Thanks in advance.
Posted

1 solution

http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#exit(int)[^]

System.exit(int) terminates the app.

What you're looking for is

Java
System.out.println(String)


I recommend to bookmark this page: http://docs.oracle.com/javase/tutorial/getStarted/index.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900