Locate the Glassfish jar file you downloaded earlier. This file should be named glassfish-installer-v2-b33e.jar.
Copy this jar file to your C:\java directory. With the jar moved to the correct location you can now ready Glassfish for use…
- Click on the “Start
- In the “Open:” box enter “cmd” and click “OK”
- A command window will open
- Type “cd \java” in the command window and hit enter.
- A license agreement window will open. Rea
- You will see the “jar” file decompress
- A new “glassfish” folder will be created under C:\java
- Apache Ant will execute the command in the setup.xml file that will render Glassfish ready for use
- The setup will finish with “BUILD SUCCESSFUL” and some information regarding how long it took for the ant script to run
Now is a good time to play with your fresh install of Glassfish. In the command window which should still be open from the preceding steps type “cd bin” which will put you in the directory “C:\java\glassfish-v2-b33e\bin.” Once in this directory type “asadmin start-domain –verbose.” The Glassfish Java EE 5 application server will start. You will see all kinds of output in your command window and once you see a message indicating that the application server has indeed started you will be able to log into the application server using a web browser.
Lets login to Glassfish now!
- Open you web browser
- Enter “http://localhost:4848” into the address bar and hit enter.
{Take care to be sure that you are entering this URL into you address bar and not some kind of search box.}
Don’t be alarmed when your browser displays a login screen that is branded with logo’s from Sun Microsystems. Sun is the “big muscle” behind the Glassfish open source project and, as indicated in previous steps, Glassfish will eventually become the next version of Sun’s Java System Application Server product line.
Go ahead and enter the default login information:
- Default User Name: admin
- Default Password: adminadmin
When you’re done poking around the web interface of Glassfish go back to your command window and type the “ctlrl-c” keyboard combination to stop the server output. Then type “asadmin stop-domain” to stop the server itself.
Consider Glassfish installed!
Our “java” folder now looks like this:
C: java
\–apache-ant-1.7.0
\–glassfish-v2-b33e
\–jdk1.6.0
\–jre1.6.0