Starting without �public static void main(String[] args) {} �
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
posted
0
public static void main(String[] args) {} is the point where program starts.But I do not want this,I want utility or loader or tool which load my java class,in that utility I specify the starting class and its method name.
Is there any way?
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
java.exe is the standard Java launcher and requires the class you call to have a main method. However, you can write your own Java launcher and call whatever method you want. Take a look at the Native Invocation tutorial for some examples of how to do this.
Originally posted by jacob deiter: public static void main(String[] args) {} is the point where program starts.But I do not want this,I want utility or loader or tool which load my java class,in that utility I specify the starting class and its method name.
Is there any way?
Starting an application and loading a class are two separate things. You can achieve the later by Class.forName();