wood burning stoves 2.0*
The moose likes Features new in Java 7 and the fly likes program without main Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Features new in Java 7
Bookmark "program without main" Watch "program without main" New topic
Author

program without main

shivdhwaj pandey
Ranch Hand

Joined: Nov 12, 2011
Posts: 63

how to run program without main
as in java 6 its runing but in java 7 compile succesfully but run time exception main method not found
class test1{
static{
System.out.println("hello");
System.exit(0);
}
}



with regards,
Shivdhway Pandey
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9956
    
163

Take a look at some of the threads listed under "Threads other viewed" table at the bottom of this page. Or you can even search for this question in the forums since it's already been discussed before.

[My Blog] [JavaRanch Journal]
Palak Mathur
Ranch Hand

Joined: Jan 29, 2007
Posts: 313

Check this thread;- http://www.coderanch.com/t/567731/Java/java/we-develop-java-application-without

If you would have checked the first page of this forum (features new in java 7), then you would have found it there.


Palak Mathur | My Blog | TechJaunt | What is JavaRanch? | List of All FAQs
 
wood burning stoves
 
subject: program without main
 
Similar Threads
Do Java program can run without main function()? If not please solve this problem
how to start before the main starts
Java program without writing main() method?
Running a java program with full path\class name
With out Main()