Nad Installation Docs-Amit
Nad Installation Docs-Amit
Nad Installation Docs-Amit
Install the JDK if you don't have installed it, download the JDK and install it.
Steps How to install the steps:
1) From this link you can download latest version of java or you can download previous
versions of java according to your requirement.
2) Click on JDK button.
Accept the license agreement and click on download link based on your bit operating machine (32
bit or 64 bit).
Click on close button and you are done with the java installation.
After this you have to set the class path of the java. So, that you can store and run your programs
from any of the drive/folder.
The path is required to be set for using tools such as javac, java etc.
If you are saving the java source file inside the jdk/bin directory, path is not required to be set
because all the tools will be available in the current directory.
But if you are having your java file outside the jdk/bin folder, it is necessary to set path of JDK.
1. temporary
2. permanent
To set the temporary path of JDK, you need to follow following steps:
For Example:
set path=C:\Program Files\Java\jdk1.6.0_23\bin
For setting the permanent path of JDK, you need to follow these steps:
Go to MyComputer properties -> advanced tab -> environment variables -> new tab of
user variable -> write path in variable name -> write path of bin folder in variable value
-> ok -> ok -> ok
For Example:
1)right click on MyComputer properties
C:\Program Files\Java\jdk1.8.0_73\bin
)click on ok button
9)click on ok button
Now your permanent path is set. You can now execute any program of java from any drive.
Now your permanent path is set.You can now execute any program of java from any drive.
2. Eclipse IDE Installation :
In the previous, we saw download and installation of the jdk. For writing the java program you
need an editor that can be anything like notepad, eclipse IDE, Netbeans IDE. All of them are using
IDE so that it provide complete resources needed for writing, compiling, running and displaying
the output at one place. You no need to switch your tabs for these things.
Select Eclipse IDE for java EE developers and you can download either 32 bit or 64 bit
according to your machine.
Extract / unzip the downloaded file to any folder of your choice. It is better to select C:/ as the
folder.
When eclipse starts up for the first time it prompts you for the location of the workspace
folder. All your data will be stored in the workspace folder. You can accept the default or
choose a new location.
If you select "Use this as the default and do not ask again", this dialog box will not come up again.
You can change this preference using the Workspaces Preferences.
A perspective has only one editor area in which multiple editors can be open. The editor area is
usually surrounded by multiple views. In general, editors are used to edit the project data and views
are used to view the project metadata. For example the package explorer shows the java files in the
project and the java editor is used to edit a java file.
The eclipse window can contain multiple editors and views but only one of them is active any given
point of time. The title bar of the active editor or view looks different from all the others.
Explore Menus
The typical menus available on the menu bar of an eclipse window are:
File: The File menu allows you to open files for editing, close editors, save editor content and
rename files. Among the other things, it also allows you to import and export workspace content
and shutdown Eclipse.
Edit: The Edit menu presents items like copy & paste.
Navigate: The Navigate menu allows you to quickly locate resources and navigate to them.
Search: The Search menu presents items that allow you to search the workspace for files that
contain specific data.
Project:The menu items related to building a project can be found on the Project menu.
Run:The menu items on the Run menu allow you to start a program in the run mode or debug
mode. It also allows presents menu items that allow you to debug the code.
Window:The Window menu allows you to open and close views and perspectives. It also allows
you to bring up the Preferences dialog.
Help:The Help menu can be used to bring up the Help window, Eclipse Marketplace view or Install
new plug-ins. The about Eclipse menu item gives you version information.
Explore Views
Eclipse views allow users to see a graphical representation of project metadata. For example the
project navigator view presents a graphical representation of the folders and files associated with a
project and properties view presents a graphical representation of an element selected in another
view or editor.
An eclipse perspective can show any number of views and editors. All editor instances appear in a
single editor area whereas views are placed inside view folders. A workbench window can display any
number of view folders. Each view folder can display one or more views.
Opening a view:
To open a view click on the Window menu and select the Show View menu item and either the menu
item that represents a view or the Other menu item.
Clicking on the Other menu item brings up the Show View dialog box that allows you to locate and
activate a view.
The views are organized by category. To quickly locate a view just type the name of a view into the
filter text box. To open a view, select it and click on the OK button.
Perspective
An eclipse perspective is the name given to an initial collection and arrangement of views and an
editor area. The default perspective is called java. An eclipse window can have multiple perspectives
open in it but only one perspective is active at any point of time. A user can switch between open
perspectives or open a new perspective. The active perspective controls what appears in some menus
and tool bars.
Open Perspective:
To open a new perspective, click on theWindowsOpen PerspectiveOther.The Open Perspective
dialog box shows all the available perspectives.
Closing Perspective:
To close a perspective, right click on the perspective name in toolbar and select the Close menu item.
Workspace
The eclipse workspace contains resources such as:
Projects
Files
Folders
The workspace has a hierarchical structure. Projects are at the top level of the hierarchy and inside
them you can have files and folders. Plug-ins use an API provided by the resources plug-in to manage
the resources in the workspace.
UI Elements for Managing the Workspace:
Users use the functionality provided by views, editors and wizard to create and manage resources in
the workspace. One among the many views that show the content of the workspace is the Project
Explorer view.
The package explorer will show the newly created package under the source folder.
The newly created class should appear in the Package Explorer view and a java editor instance that
allows you to modify the new class should appear in the editor area.
The java build path can be seen and modified by using the Java Build Path page of the Java Project
properties dialog.
To bring up the Java Project properties dialog box, right click on a Java Project in the Package Explorer
view and select the Properties menu item. On the left hand side tree select Java Build Path.
A common requirement seen while developing java applications is to add existing jars to the java
build path. This can be accomplished using the Libraries tab. In the Libraries tab, just click on Add JARs
if the jar is already in the Eclipse workspace or click on Add External JARs if the jar is elsewhere in the
file system.
publicclass HelloWorld {
publicstaticvoid main(String args[]){
System.out.println("Hello World!");
}
}
3. Right click on HelloWorld.java Select Run asJava Application.
To disable automatic compilation deselect the Build Automatically option from the Project menu.
If automatic compilation is disabled then you can explicitly build a project by selecting the Build
Project menu item on the Project menu. The Build Project menu item is disabled if the Build
Automatically menu item is selected.
3. MySQL Installation :
http://dev.mysql.com/downloads/mysql/
Click on download button for downloading.
http://dev.mysql.com/downloads/mysql/
Click on the Archived versions
Select the products which ever you need, here am selecting the MySQL community server.
Pick the version number for MySQL Community Server you want and, as exactly as possible, the platform
you want.
Video: https://www.youtube.com/watch?v=UgHRay7gN1g
Once download your file (msi installer), double click on that file for installing
In this step, choose the setup type you want and click on Next button.
Right now we need for development purpose so select Developer Default anc Click on Next Button.
Click on Next Button.
These are the products will install once we Click on Execute Button.
It will start installing all the products. Once installing all the products Click on Next Button.
Click on Next Button.
Click on Next Button.
Click on Next Button.
Creating accounts and roles.
Create new password, here you can create new user accounts and can give privileges
Click on Check button for testing the server whether it is connected successfully or not.
If you want to start MySQL workbench right away then check the box otherwise you can start workbench
later.
Once installation is successful then you can start working either from workbench or MySQL command
client.
Open MySQL Command Line Client application, and it will ask for admin password. Enter the password
and click enter button.
If password is correct, you should see as below
Now you can perform operations like create database, tables, and insert data into tables, updating table
by using sql commands.
Database and table creation:-
we are creating a database called twdemo and then creating associated tables. To create the database, allow
the database to be used and create a table, implementing the following commands:
Here you will find a collection of basic MySQL statements that should prove useful for basic CRUDS operations (create, replace,
update, delete, select).
There may be some issues with the kind of quotes you use around your data. If you are having difficulties, try using singe quotes
(‘ ) or tricky quotes ( ` -- on keyboard key next to number 1) around your data. One or the other is bound to work.
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL
Workbench provides data modelling, SQL development, and comprehensive administration tools for
server configuration, user administration, backup, and much more.
This will open the Setup New Connection as shown in the below figure
Fill out the connection details. You can test the connection also by entering the password.
If the connection is successful then below screen will appear and Click on Ok Button.
Click on OK Button and you connection is ready appear on the workbench.
Now you can start writing the MySQL commands in your particular connection. Like that you can create
number of connections.
Click on the connection and database window is opened.
Now first create the database. Click on the button which shows on the below screen.
Write the database name in the Name field and Click on Apply button.
Note : lowercase letters are accepted.
Click on Apply Button.
Click on Finish Button.
Creating tables in the database.
For creating, inserting, update, alter and other operations you can use either SQL editor or schema.
Click on SQL Editor which is shown in the below screen.
It will open SQL Editor in below screen and you can start writing the MySQL commands and execute.
Write the MySQL command, execute and displaying the output which is shown in below screen.
MySQL tutorial - Under Construction
You can download the file either in .zip file or windows service installer file.
Download latest version of tomcat server file (.zip) from
https://tomcat.apache.org/download-70.cgi
Unzip the download file in your desired folder (ex: C:\apache-tomcat-7.0.65)
Tomcat Manager:
Tomcat manager application is provided as part of the Tomcat distribution and is stored in
the CATALINA_HOME/webapps/manager directory by default. It’s a special web application that
allows manage other web applications while the Tomcat server is running. One can, for example, deploy,
undeploy, start, and stop web applications on the server using this tool.
By default, access to the manager application is disabled; this can be accessed only by an authenticated
user. The default realm for the manager application is CATALINA_HOME/conf/tomcat-
users.xml .
To set up the manager application, add a user with the manager role to this file. The role manager names
can be found in the CATALINA_HOME/webapps/manager/WEB-INF/web.xml file of the Manager
Web application. One of the available roles is manager-gui – provides access to the HTML interface.
Add / update users and roles in tomcat-users.xml:
1. Open CATALINA_HOME/conf/tomcat-users.xml
2. Add the manager role and then alter an existing user (such as tomcat), as follows:
<?xmlversion='1.0'encoding='utf-8'?>
<tomcat-users>
<rolerolename="tomcat"/>
<rolerolename="admin-gui"/>
<rolerolename="manager-gui"/>
<userusername="tomcat"password="tomcat"roles="tomcat, manager-
gui,admin-gui"/>
</tomcat-users>
Note: whenever you make changes in any .xml files of tomcat, must need to stop and start
the server for reflecting the changes.
Access Manager Application:
1. Start Server(refer 15.3 step)
2. Go to http://localhost:8080/and click the “Manager App” button (or) go
tohttp://localhost:8080/manager/html
This will prompt for the user name and password. Enter the values from the tomcat-users.xml.
7.1. Start and Stop Server:
1. To start the tomcat server, go to C:\apache-tomcat-7.0.65\bin and find
startup.bat file and run it.
2. To stop the server, go to C:\apache-tomcat-7.0.65\bin and find shutdown.bat file
and run it.
Note: for starting server please make sure that your java home path should be configured in environment
variables. If not please follow the steps.
The below screen shows the web applications running on the tomcat server. If you want to
deploy your web application then you can deploy by creating the war file of your application.
Downloading and installing the windows service installer file.
Download latest version of tomcat windows service installer from the below the following link
https://tomcat.apache.org/download-70.cgi
Double click on the tomcat windows installer file and Click on Next Button.
Click on I agree button.
Select the path where you r java installed on your machine. Automatically it will take the path if not
select the path of the java and Click on Next button.
Select the path where you want to install the tomcat on your machine.
use the default path which shows on the screen (recommended) and Click on Next button.
It will start installing tomcat on your machine.
For testing run the apache tomcat server now. The below screen shows starting the apache tomcat
server.
Test Server:
After started server open web browser and go to http://localhost:8080/, then you should see
the following screen
If the tomcat configuration is success then the following screen should be appear.
Oracle XE installation :
http://www.oracle.com/technetwork/database/database-
technologies/express-edition/downloads/index.html