This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Howdy You have several deployment options: 1) 100% local (executable jar) 2) part local, part remote (JWS, RMI) 3) 100% remote (Servlets, EJB) 1) Executable Jar: - create a jar file with your application, which includes a manifest: --create a manifest for the jar with an Main-Class entry, that says *which* class has the main method Main-Class: MyClass // don't say '.class' on the end to MAKE the jar: % jar -cmf myManifest.txt myApp.jar MyClass.class - run the jar at the command-line, or create a script that will do this for you, so that when you execute the script, Java starts up and invokes the main method of the class in your jar. % java -jar myJar.jar // this has your class with a main() in it
2). To use Web Start: * Make an executable jar * write a .jnlp file * place your jar and your .jnlp file where they can be served by your web server * add a new mime type to your web server application/x-java-jnlp-file * create a web page with a link to your .jnlp file Note: the user MUST have Java Web Start (a helper application that of course requires Java) installed! Assuming the user has Java Web Start installed (OS X ships with it already installed) it works very simply: 1) user clicks the HTML link 2) Web server serves back the jnlp file, with the appropriate mime-type header 3) browser reads the jnlp file and sees that it needs to hand it over to the Java Web Start on the user's machine 4) Java Web Start processes the jnlp file and gets the name and URL of the executable Jar 5) Java Web Start downloads the Jar and launches it (i.e. invokes the main method listed in the jar's manifest). Of course, a gazillion things can go wrong, but that is the overview. cheers, Kathy p.s. if you are looking for just 100% local deployment information, then probably the regular Java intermediate forum might be a good place to look.