| Author |
customize the entry point of program
|
pradeepta chopra
Ranch Hand
Joined: Jul 05, 2008
Posts: 137
|
|
hi cant we customize the entry point of our program?? like we have main as the entry point for execution of our program.is there any way we can make some other method as the entry point of execution of our program??
|
 |
Rajkamal Pillai
Ranch Hand
Joined: Mar 02, 2005
Posts: 434
|
|
Hi, Do keep in mind that you are talking about programs executed from the command line. Other for example servlets or applets have different entry points. Cheers, Raj.
|
 |
Gamini Sirisena
Ranch Hand
Joined: Aug 05, 2008
Posts: 347
|
|
Pradeep, I am curious.. What are you trying to do?
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
Originally posted by pradeepta chopra: hi cant we customize the entry point of our program?? like we have main as the entry point for execution of our program.is there any way we can make some other method as the entry point of execution of our program??
Apart from things like applets, which usually use init() and servlets, both as mentioned earlier, no. The JVM specifically looks for the main method with a particular signature, and will throw an Exception if it isn't found.
|
 |
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
|
|
|
You could write your own custom JVM launcher.
|
Joanne
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
Originally posted by Joanne Neal: You could write your own custom JVM launcher.
. . . Only if you want me to move you off beginners, Joanne.
|
 |
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
|
|
Originally posted by Campbell Ritchie: . . . Only if you want me to move you off beginners, Joanne.
I did think twice about posting a reply. Decided to just put the idea out there without going into too much detail.
|
 |
pradeepta chopra
Ranch Hand
Joined: Jul 05, 2008
Posts: 137
|
|
ok thank you al
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
Originally posted by pradeepta chopra: ok thank you al
You're welcome
|
 |
 |
|
|
subject: customize the entry point of program
|
|
|