aspose file tools*
The moose likes Beginning Java and the fly likes customize the entry point of program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "customize the entry point of program" Watch "customize the entry point of program" New topic
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: 443
    
    1

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: 375
Pradeep,
I am curious..

What are you trying to do?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39868
    
  28
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: 3739
    
  16
You could write your own custom JVM launcher.


Joanne
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39868
    
  28
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: 3739
    
  16
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: 39868
    
  28
Originally posted by pradeepta chopra:
ok thank you al
You're welcome
 
 
subject: customize the entry point of program