I'm often asked, how to start with Java EE 5 with minimal setup/environment. In the world of Java there in general several options available - which is a good thing. However, you have to start somehow and refine your environment later. The easiest way (minimal amount of mouse-clicks), is the following:
- Buy a mouse with a good, right button :-)
This downloads netbeans with full Java EE support, as well as the production read reference implementation (Glassfish v2). It works with Netbeans 5.5.1 as well, but the editor of Netbeans 6.0 was improved significantly
- Download or pickup some examples from the Java EE 5 tutorial (optional).
- In netbeans: Select Tab "Projects", right mouse click, Enterprise Projects -> Enterprise Application
- Go to the "Bean Project" (EJB Module). right mouse click, select a "Session Bean". Implement a "Hello World" method with a return value (e.g. String sayHello()).
- Go to the "Globe Project" (War). right mouse click, select a "Servlet". right mouse click -> Enterprise Resources -> Call Enterprise Bean. Invoke the bean inside the method "processRequest"
- Right click on the "Triangle Project" (EAR) right mouse click -> run. This can take several seconds/minutes. Netbeans starts the application server, deploys the application and opens the browser.
- Close the IDE, Shutdown the machine -> and enjoy the weekend :-)
Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition
airhacks.fm the podcast:
Stay in touch: airhacks.news.