The Max OS X comes with Java 5 installed. So, here are main steps:
* Download Java EE 5 Tutorial package from http://java.sun.com/javaee/5/docs/tutorial/information/download.html
* Download Sun Java System Application Server 9.1 from http://java.sun.com/javaee/downloads/. I downloaded Java EE 5 SDK Update 3 that comes with the application server.
* Use instructions posted here on how to install it
Also use Application Server Installation Tips posted here: http://java.sun.com/javaee/5/docs/tutorial/doc/gexaj.html
Once the application server is installed, change permissions on the SDK/javadb, so the folder permissions allow creating a database. Here is an example on how to do that:
sudo chown –R your_name javadb
In general, I believe it is a good idea to change permissions to other files in SDK to some less privileged user than root.
Once I started playing with bookstore example, I’ve got some build and deployment errors. I found that I need to create a password file and point to it with the javaee.server.passwordfile property.
Create a new file app-server-psw.properties in the javaeetutorial5/examples/bp-project/ folder. Edit the file and add
The admin_password should be the same as it was specified during the Application Server installation.
Update javaeetutorial5/examples/bp-project/app-server.properties by adding these properties:
Once that is done, the bookstore example build and deployment works fine.