Hi Phani,
Probably the code below will help you to get my point:
I have written a server class
package server;
class Server {
public static void main(String[] args) {
System.out.println("In server main!!");
}
}
Now i jar this, and put the server.jar in classpath of the other class MyServer and the MyServer class is in the same package
package server;
public class MyServer {
public static void main(String[] args) {
System.out.println("In My server main!!");
Server.main(args);
}
}
So you can see I can invoke the main method of Server class and this is something I want to restrict. I hope this will make my point more clear.
Though i know that this is not of much use but still it just came as a thought to me
- Ankur