Monday 10 October 2011

Glassfish

Goldfish Server Tutorial


NOTE: Versions may differ as time moves on. Ideally use most recent versions in all cases.



Install Goldfish Server


Get the Goldfish server from Java EE 6 SDK http://www.oracle.com/technetwork/java/javaee/downloads/index.html



Ideally already have the Java JDK 7 (or better installed) and tested along with NetBeans IDE.



Java EE 6 SDK Update 3 Includes:

GlassFish Open Source Edition 3.1.1
Java EE 6 Code Samples
Java EE 6 API Documentation
Java EE 6 Tutorial
Your First Cup: An Introduction to the Java EE Platform


To Start Goldfish Server from cmd prompt


Once installed



H:\>H:\glassfish3\glassfish\bin\asadmin.bat start-domain domain1
Picked up _JAVA_OPTIONS: -Duser.home=H:\Apps\Profile\Java
Waiting for domain1 to start ...............................................................................................
...................................................
Successfully started the domain : domain1
domain Location: H:\glassfish3\glassfish\domains\domain1
Log File: H:\glassfish3\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.



To Start Goldfish Database from cmd prompt


H:\>H:\glassfish3\glassfish\bin\asadmin start-database --dbhome H:\glassfish3\javadb
Picked up _JAVA_OPTIONS: -Duser.home=H:\Apps\Profile\Java
Picked up _JAVA_OPTIONS: -Duser.home=H:\Apps\Profile\Java
Database already started on host 0.0.0.0, port 1527.
Command start-database executed successfully.



To Deploy and Run application from NetBeans


In NetBeans IDE, select File→Open Project.

In the Open Project dialog, navigate to:

tut-install/javaeetutorial5/examples/web/Select the bookstore1 folder.

Select the Open as Main Project check box and the Open Required Projects check box.

Click Open Project.

In the Projects tab, right-click the bookstore1 project, and select Undeploy and Deploy.

To run the application, open the bookstore URL http://localhost:8080/bookstore1/bookstore.



Deploy Log from Net Beans


init:
deps-module-jar:
bookstore.init:
Deleting: H:\NetBeansProjects\javaeetutorial5\examples\web\bookstore\build\built-jar.properties
bookstore.deps-jar:
Updating property file: H:\NetBeansProjects\javaeetutorial5\examples\web\bookstore\build\built-jar.properties
bookstore.compile:
bookstore.jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Picked up _JAVA_OPTIONS: -Duser.home=H:\Apps\Profile\Java
Undeploying ...
Initializing...
In-place deployment at H:\NetBeansProjects\javaeetutorial5\examples\web\bookstore1\build\web
Initializing...
run-deploy:
BUILD SUCCESSFUL (total time: 1 minute 4 seconds)



Thursday 31 March 2011

How to use SVN with Eclipse

This is a link to a very useful guide to creating a java project from an SVN repository.

http://blog.jedwhite.com/2010/09/how-to-set-up-eclipse-helios-and-google.html

First Entry

This is the start