Getting Started Guide
TThe best way to get started with Jolorun is to create your first project. Jolorun has an
advanced mode, but let's stick with the defaults to see how easy it is to create a
Java EE 6 application.
First of all, download Jolorun, set the
JOLORUN_HOME variable and add the
$JOLORUN_HOME/bin directory to your path. To check if Jolorun is up and running, just type :
C:\> jolorun version
jolorun version 6.0.1
Create a project
Jolorun is now set up. To create a new project, just type
jolorun create-project. A GUI editor will show up, asking you to provide some information :
- Project name : the name of your project
- Package name : the root package of your code
- Java EE 6 Profile : choose from web or enterprise profile
- Output source : the directory where you want your code generated (let's call it PROJECT_HOME)
- Application server : the target application server (choices are GlassFish V3)
- Clusterable : will the application be clustered ?
- Database : the database you want to store you data in (choices are Derby and MySQL)
- Database URL, user name and password

At any time you can click on the
Help menu for information about each field and its effects on your project. For example, by clicking on
Clusterable, the stateless bean layer will have a remote interface.
Click on
Create project (that's all for now).
Browsing the source code
Now go to the output directory where the code was generated (
$PROJECT_HOME). At the root you can see a Maven
pom.xml file. This file allows you to compile, build your code, as well as run the tests.
The generated code follows Maven conventions, you'll find :
- $PROJECT_HOME/main/src/java : where the code of the application is. It is mostly structured in clientapp (a Swing application), webapp (a JSF web application), a layer of service, the data model, and some util classes.
- $PROJECT_HOME/test/src/java : where the unit test classes are (following the same structure).
Compile the code
Make sure that Maven is set up, open a command window and type
$PROJECT_HOME> mvn install.
The compiled classes and the jar files are located under the
$PROJECT_HOME/target directory. In this case Maven has created a
MyProject.ear file.
Run the application
Make sure GlassFish V3 is installed, as well as Derby, and type
mvn glassfish:deploy.
Use your browser to go to
http://localhost/application_name
Comments: 0