users@glassfish.java.net

Re: Making a standalone with hk2

From: <glassfish_at_javadesktop.org>
Date: Sat, 26 Jan 2008 05:29:17 PST

Thank you for your reply.

I don't quite get the picture how should I use
public class MyMain extends com.sun.enterprise.module.bootstrap.Main{
public static void main(String[] args) {
new MyMain().run(args);
}
}

My situation is like this, I have a class Start that is like a core:

public class Start implements ModuleStartup {


//many Injects go here

        private StartupContext context;


        public void setStartupContext(StartupContext context) {
        
        }

        public static void main(String[] args) {

        }

        public void run() {
//many void and functions are called from here

        }
}

This is the only class in this module, but it @Injects every needed service and runs them. I want to run this class from the console. How can I do it?
[Message sent by forum member 'antsh' (antsh)]

http://forums.java.net/jive/thread.jspa?messageID=255941