Beruflich Dokumente
Kultur Dokumente
5,Mysql5 And Rooster Application for Windows OS Step document to install Java in Windows OS
To compile and run a java program we need to install java platform. JDK (Java Development Kit). JDK is the basic set of tools required to compile and run java programs. This section enables you to download JDK and teaches you the steps to install it. Download and Install JDK (Java Development Kit) You can download the latest version of jdk from http://java.sun.com/javase/downloads/index.jsp. Once you download the exe file you can now install it. Just follow as mentioned: To install the jdk, double click on the downloaded exe file (jdk-6u1-windows-i586-p.exe)
Step 2: Now a "License Agreement" window opens. Just read the agreement and click "Accept" button to accept and go further.
Step 4: Click on "Change" button to choose the installation directory. Here it is "C:\Program Files\ Java\jdk1.6.0_01". Now click on "OK" button.
Clicking the "OK" button starts the installation. It is shown in the following figure.
Click the "Change" button to choose the installation directory of Runtime Environment. We prefer not to change it. So click "Next" button.
Step 7: Now "Complete" window appears indicating that installation of jdk 1.6 has completed successfully. Click "Finish" button to exit from the installation process.
Step 8: The above installation will create two folders "jdk1.6.0_01" and "jre1.6.0_01" in "C:\ Program Files\ java" folder.
Step 9: To make available Java Compiler and Runtime Environment for compiling and running java programs , we set the system environment variables. First of all select "My Computer" icon and right click the mouse button. Now click on "system Properties" option. It provides the "System Properties" window , click the 'Advanced' tab. Then Click the "Environment Variables" button. It provides "Environment Variables" window. Now select the path in System variables and click 'Edit' button. The"Edit System Variable" window will open. Add "c:\Program Files\Java\jdk1.6.0_01\bin" to 'variable value' and click 'Ok', 'Ok' and 'Ok' buttons.
Step 10: Now set the JAVA_HOME variable and set its value to " C:\Program Files\Java\jdk1.6.0_01 ". If this variable has not been declared earlier then create a new system variable by clicking on "New" button and give variable name as "JAVA_HOME" and variable value as " C:\Program Files\Java\jdk1.6.0_01 ". Now click "OK". This variable is used by other applications to find jdk installation directory. For example, Tomcat server needs "JAVA_HOME" variable to find the installation directory of jdk.
Step 11: Now this is the final step to check that you have installed jdk successfully and it is working fine. Just go to the command prompt and type javac and hit enter key you will get the screen as shown below :
A Welcome screen shot appears that shows the beginning of installation process. Just click on the 'Next' button to proceed the installation process. Steps 2: A screen of 'License Agreement' displays.
Click on the 'I Agree' button. Step 3: A screen shot appears asking for the Choose component
Choose the default components and click on the 'Next' button. Step 4: A screen shot appears asking for the 'installing location'
Choose the default components and click on the 'Next' button. Step 5: A screen shot of 'Configuration Options' displays on the screen. Choose the location for the Tomcat files as per your convenience. You can also opt the default Location
The port number will be your choice on which you want to run the tomcat server. The port number 8080 is the default port value for tomcat server to proceed the HTTP requests. The user can also change the 'port number' after completing the process of installation; for this, users have to follow the following tips. Go to the specified location as " Tomcat 6.0 \conf \server.xml ". Within the server.xml file choose "Connector" tag and change the port number. Now, click on the 'Next' button to further proceed the installation process. Step 6: A Window of Java Virtual Machine displays on the screen
This window asks for the location of the installed Java Virtual Machine. Browse the location of the JRE folder and click on the Install button. This will install the Apache tomcat at the specified location. Step 7: A processing window of installing displays on the screen.
To get the information about installer click on the "Show details" button Step 8: A screen shot of 'Tomcat Completion' displays on the screen.
Click on the 'Finish' button. Step 9: A window of Apache Service Manager appears with displaying the running process.
Let the running process goes on. Step 10: After completing the installation process, the Apache Tomcat Manager appears on the toolbar panel like shown in the below picture.
A configured window appears on the desktop. Now, just click on the Startup button. The installation process will be completed. ii-) Configuration from the Control Panel
To configure the Apache Tomcat Manager, Users will have to follow the follwing steps: Click on the Start up button -- select Control Panel -- Administrator Tool -- Services -select Apache Tomcat. The following screen displays on the monitor.
Double click on the Apache Tomcat. The window of Apache Tomcat Properties appears on the screen.
Now, Click on the start up button. The Apache Tomcat is now ready to function. To operate it, follow the below steps of processing. Start the Tomcat Server: 1.Start the tomcat server from the bin folder of Tomcat 5.5 directory by double clicking the "tomcat5.5.exe" file. OR create a shortcut of this .exe file at your desktop. 2. Now Open web browser and type URL http://localhost:8080 in the address bar to test the server 3. To Stop the Tomcat Server: Stop the server by pressing the "Ctrl + c" keys. The screen of Apache Tomcat software looks like this:
To quickly get a request up and running, following are all images to show step by step what to do on the installation screens. I will over the next few days, break this down with written comments and span it over a few pages. Hank, this should get you up and running!
Ex
rooster
2. Copy the folder and Paste it inside Tomcat server webapps forder
Ex:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps \
3. To open struts-config.xml.Goto rooster/WEB-INF/ struts-config.xml Modify your Database Name, Database User Name and Password Ex:
<set-property property="url" value="jdbc:mysql://localhost:3306/rooster_1" /> <set-property property="username" value="root" /> <set-property property="password" value="root" />
4. To open rooster.properties.Goto rooster/WEB-INF/classes/ rooster.properties Modify your Database Name, Database User Name and Password Ex
DATABASE_CONNECTION_URL=jdbc:mysql://localhost:3306/rooster_1 DATABASE_CONNECTION_USERNAME=root DATABASE_CONNECTION_PASSWORD=root
5. To open config.xml.Goto rooster/WEB-INF/config/config.xml Modify your Database Name, Database User Name and Password Ex
<id>file</id> <!-- the connection url for the JDBC connection --> <database>jdbc:mysql://localhost:3306/rooster_1</database> <!-- the connection class --> <driver>com.mysql.jdbc.Driver</driver> <!-- the user with read/write/delete/update/select permission to the database --> <login>root</login> <!-- the plain text password --> <password>root</password>
b. c. d. e.
http://code.google.com/apis/maps/signup.html Enter your website URL then click Generate API Key Enter your Gmail user id and Password. After login you got Google Map Key Copy the Google Map Key and Paste it in rooster/classes/rooster.properties files
Ex :
GOOGLE_MAP_KEY=ABQIAAAAz7uTtv40QiYhSAwsvpNF5xS2AJWXKF H8CHxFRAAHZWk2-cMdSxSoAuuXOtIEvFEBeXwsPCJ1jeovTg
8. Implementing Rooster Database. a. Click Start All programs MYSQL Mysql Server 5.0 MYSQL command Line Client b. Create new database Ex mysql> create database rooster_app c. Use the database Ex mysql > use rooster_app d. Run rooster-db-structure.sql file which is in dbscript folder inside the application to create Database structure for rooster Ex: \. Your application folder\rooster\roosterdb.sql e. Run initial-setup.sql with the help of README.txt file in dbscript folder to create user. 9. Start tomcat server, 10. Enter URL address in browsers Address bar