Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Prepared by tutor 430860
Page 1 of 34
Installation of Java JDK, NetBeans, Tomcat, Java DB
Install Java JDK ............................................................................................................................................ 2
Install NetBeans, Tomcat, JavaDB ............................................................................................................... 5
Install Plugin (e.g. easyUML) ..................................................................................................................... 25
Uninstall NetBeans, Tomcat and JavaDB ................................................................................................... 31
Prepared by tutor 430860
Page 2 of 34
Install Java JDK
1. Type http://www.oracle.com/technetwork/java/javase/downloads/index.html in browser to
download the latest Java Platform (JDK) 8u25 (i.e. 1.8.0_25) or later version.
Prepared by tutor 430860
Page 3 of 34
2. Clicking ‘Download’ will go to the following screen, select ‘Accept License Agreement’ and
‘Windows x86’ if you are using 32-bit Windows; ‘Windows 64 if you are using 64-bit Windows.
3. Save jdk executable file into a folder in your hard disk. After saving this file, double-clicking this
file to install.
4. In Windows 7, select ‘Start | Control Panel | System | Advanced system settings | Environment
Variables | Path in system variables’. In Windows 10 or above, select ‘Start | Settings | System |
About | System Info | Advanced system settings | Environment Variables | Path in system
variables’. Then click ‘Edit’. Append the following to the end of ‘Variable value’. Then click ‘OK’
twice to effect the change if Java JDK of version jdk1.8.0_25 is installed.
‘; C:\Progra~2\Java\jdk1.8.0_25\bin’ for 32-bit Windows
‘; C:\Progra~1\Java\jdk1.8.0_25\bin’ for 64-bit Windows
Note: ‘C:\Progra~2’ denotes ‘C:\Program Files (x86)’, and ‘C:\Progra~1’ denotes ‘C:\Program
Files’
Prepared by tutor 430860
Page 4 of 34
5. Ensure ‘javac -version’ and ‘java -version’ could be used properly in the command prompt.
6. Please refer to
‘http://download.oracle.com/javase/tutorial/getStarted/cupojava/win32.html’ to create a
source Java file (i.e. ‘HelloWorldApp.java’), compile it and run it in command prompt of
Microsoft Windows. Compiling Java programs in command prompt is optional. This is
because NetBeans Integrated Development Environment (IDE) will be used for doing Tutor
Marked Assignment (TMA) programming tasks in this course.
Prepared by tutor 430860
Page 5 of 34
Install NetBeans, Tomcat, JavaDB
1. Type http://netbeans.org/ in browser, click ‘Download’ to download NetBeans IDE 8.1 or later
version. Pre-requisite: Java JDK must be installed first.
Prepared by tutor 430860
Page 6 of 34
2. Select ‘Java EE’, click ‘Download’ to save installer executable file in one folder of your
computer. Note this version includes ’GlassFish Server’ and ‘Apache Tomcat’. ‘Apache
Tomcat’ will be used as web server and application server in the later units.
Prepared by tutor 430860
Page 7 of 34
3. Double-click the installer executable file to install NetBeans with the following options. Note:
NetBeans, GlassFish and Apache Tomcat will be installed under “ C:\Program Files\” for
Windows XP, but under “C:\Program Files (x86)” for Windows 7 or above.
Select BOTH options!
Prepared by tutor 430860
Page 8 of 34
Prepared by tutor 430860
Page 9 of 34
Prepared by tutor 430860
Page 10 of 34
Prepared by tutor 430860
Page 11 of 34
Prepared by tutor 430860
Page 12 of 34
4. You will see the following screen upon successful installation.
5. Click ‘NetBeans IDE’ icon in your desktop to launch NetBeans. If you have installed previous
version (e.g. 7.4) of NetBeans, you will see the following question dialog and click ‘Yes’.
Otherwise, you will not see this dialog.
Check ‘View | Toolbars’ to see if the following are enabled. Also, tick the following ‘Show’ options.
Prepared by tutor 430860
Page 13 of 34
Prepared by tutor 430860
Page 14 of 34
6. Check installed Netbeans version by selecting ‘Help | About’ menu item, the following screen
will show the installed NetBeans version and Java JDK version.
Prepared by tutor 430860
Page 15 of 34
7. To launch NetBeans, you may see this icon if you have installed firewall. You may check
proper options according to your own needs.
8. In ‘Services’ tab page, right-click ‘Server’ and select ‘Add Server’.
Prepared by tutor 430860
Page 16 of 34
9. Select ‘GlassFish’ in the pop-up dialog box. ‘GlassFish’ is web server that is optional to
this course.
Prepared by tutor 430860
Page 17 of 34
10. Select the installation location of ‘GlassFish’ by using ‘Browse’ button.
Prepared by tutor 430860
Page 18 of 34
11. Use the default domain location recommended (note: the
following c:\users\lc\personal_domain_4 is generated by Netbeans, it may be different from
your installation, no need to modify it)
Prepared by tutor 430860
Page 19 of 34
12. Verify Java DB installation is OK by selecting ‘Services’ tab page, and then select ‘Databases |
jdbc:derby://localhost:1527/sample [app on APP]’, right-click and select ‘Connect’. (Note:
Java DB will be covered in later units where database is discussed)
Prepared by tutor 430860
Page 20 of 34
13. Click ‘sample’ database to see its details
Prepared by tutor 430860
Page 21 of 34
14. The following will be shown if the Java DB is connected. To disconnect the database, just
right-click it and select ‘Disconnect’.
Prepared by tutor 430860
Page 22 of 34
15. Verify Apache Tomcat installation is OK by selecting ‘Services’ tab page, and then select
‘Servers | Apache Tomcat’, right-click and select ‘Start’. (Note: Tomcat will be covered in later
units where Servlet, JSP are discussed).
Prepared by tutor 430860
Page 23 of 34
16. The following screen will be displayed once the Tomcat is started. To stop Tomcat server, just
right-click it and select ‘Stop’.
Prepared by tutor 430860
Page 24 of 34
17. Select ‘Tools | Options | Editor | Formatting’, change ‘2’ (or ‘3’ depending on your favorite) to
‘Number of Spaces per Indent’ and ‘Tab Size’, and then click ‘OK’.
18. Please refer to ‘http://download.oracle.com/javase/tutorial/getStarted/cupojava/netbeans.html’ to
create a Java application “Hello World App”, create a Java source file “HelloWorldApp.java”,
compile it and run it in NetBeans Integrated Development Environment (IDE). NetBeans is a
preferred approach for developing Java program, JSP and Servlet etc in this course.
Prepared by tutor 430860
Page 25 of 34
Install Plugin (e.g. easyUML)
1. Go to http://plugins.netbeans.org/plugin/55435/easyuml to download easyUML plugin. Click
‘Download’ button. easyUML plugin was tested to work properly in 32-bit Windows 7 and 64-
bit Window 10. Most likely, it works properly in 64-bit Windows 7 and 32-bit Windows 10 as
well.
2. Unzip the plugin file into a folder.
For Netbeans 8.0, 8.0.1
or 8.0.2
For Netbeans 8.1
Prepared by tutor 430860
Page 26 of 34
3. Select ‘Tools | Plugins | Downloaded’ and click ‘Add Plugin’, select all plugins (i.e. *.nbm) in the
highlighted folder and click ‘Open’. Then click ‘Install’ to start install this plugin.
Prepared by tutor 430860
Page 27 of 34
4. Click ‘Next’ as follows.
Prepared by tutor 430860
Page 28 of 34
5. Tick the checkbox ‘I accept …’ as follows and click ‘Install’.
6. Click ‘Continue’ to proceed as follows.
Prepared by tutor 430860
Page 29 of 34
7. Click ‘Finish’ to restart Netbeans to effect the plugin.
Prepared by tutor 430860
Page 30 of 34
8. Check UML by selecting ‘File | New Project | UML’. When you see the following, it means the
UML plugin is installed successfully.
Prepared by tutor 430860
Page 31 of 34
Uninstall NetBeans, Tomcat and JavaDB
1. In Windows 7, click Start | Control Panel | Uninstall a program. If you are using Window 10, go
to step 2.
2. For Windows 10 or above users, click Start | Settings | System | Apps & Features,
Prepared by tutor 430860
Page 32 of 34
3. Select the NetBeans to uninstall
Prepared by tutor 430860
Page 33 of 34
4. Tick ‘GlassFish’ and ‘Apache Tomcat’ check-boxes to un-install them as well.
Prepared by tutor 430860
Page 34 of 34
5. Upon successful un-installation, it will display the pop-up dialogue.