Tuesday, July 15, 2014

Setting up development environment for GWT

Introduction

This is part of series intended to develop cross platform mobile applications in Java. In this blog post we will see what GWT is and set up the development environment for GWT.

GWT is an open source development toolkit for developing complex browser based Ajax applications. Using GWT you can develop Rich Internet Applications(RIA) in Java which is then compiled into JavaScript and is cross browser compliant.

Some of the advantages of developing web applications in GWT are:

Since GWT apps can be developed in Java, you can enjoy all the advantages of developing in Java like auto-complete,Debugging, refactoring, code reuse, polymorphism, over riding, over loading. And Java has large set of tools for development like Eclipse, NetBeans,JUnit and Maven etc which you can use for developing Rich Internet Applications(RIA).

Maintaining large JavaScript projects is not easier when compared to Java projects. But you need JavaScript to run Rich Internet Applications in browser. GWT combines both the advantages. You develop the applications in Java and then they are compiled into JavaScript, so you are having best of both.
GWT is almost similar to AWT and Swing packages in Java and so has a low learning curve for Java Developers.
Supporting several browsers in the market is a difficult tasks. Each browser creates it own set of problems. GWT solves this problem by creating optimized JavaScript code for each browser specifically addressing the issues with that browser. So you can support almost all the major browsers including Android , iPad and iPhone based browsers without worrying about quirks for each browser.

Developing UI's in Java is difficult task compared to other aspects of Java programming. GWT solves it by providing several UI widgets and also you can extend the existing widgets and create your own custom widgets if you wish to.

Some of the limitations of GWT are:

Since the java code is compiled into JavaScript which runs on the browsers, the JavaScript needs to be enabled on the browsers. The applications will not work if the JavaScript is not enabled on the browser.
If you have specialist UI designers who can create HTML pages, this will not work. You may have to implement what ever Designer created again in GWT.

Web Pages created by GWT cannot be indexed by search engines since these applications are generated dynamically.

I think except the second drawback in the list, others don't matter much. It is difficult to provide a rich internet application just in HTML. You will need JavaScript to create rich internet applications. Some apps provide a limited version of apps which work if JavaScript is disabled but majority of apps require JavaScript , so you are not the one there. And there is no reason why large number of users will disable JavaScript on their browsers.

And there is a work around for indexing by search engines. The index page can be created in html, and the remaining pages can be created in GWT. GWT provides an option to define index page in html format. So the index page can still be indexed by search engines and the other pages are mostly dynamically created data, so they don't need to come up in the search unless you they are some kind of content management systems(CMS).

Like the case with all the frameworks, GWT doesn't solve all the issues, but it surely makes the java developers more productive developing the web applications, provides cross browser support and works perfectly for complex enterprise web applications.

GWT Development Environment Setup

We will start setting up the development environment for GWT applications.

Java

Since you will developing the applications in Java before they are compiled into JavaScript, you need to set up Java development environment.
Once Java environment is set up, let us configure the environment for GWT.

GWT SDK:

Download the latest version of GWT SDK from the GWT project site.
http://www.gwtproject.org/download.html

gwt_1

Go to the above link and click on ‘Download GWT SDK’ highlighted in the above screen. Then unzip the downloaded GWT SDK to your preferred location on your hard disk and it will look similar to the below screen shot.

  101

You might want to add this path to use the commands available in gwt.

Right click on ‘Computer’ on your desktop and select ‘Properties’ which displays the below screen. Click on ‘Advanced System settings’.

a5

Click on ‘Environment Variables’ in the below screen.

a6

Clicking on Environment Variables will display the below Window. Select ‘Path’ from the list of available variables and add the path to which you extracted GWT SDK.

a7

z1 
Then click on ‘OK’ to close the ‘Edit User Variable’ screen and ‘OK’ in ‘Environment Variables’ and ‘System Properties’ window to save the modifications.

 

Eclipse


You need to install the eclipse plug-in for GWT to develop GWT applications on eclipse easily. To install GWT eclipse plug-in , launch eclipse , go to Help –> Eclipse Marketplace

111

Search for GWT in the eclipse market place.

122

Find out ‘Google Plugin for Eclipse’ and the version number should match the version of the eclipse you are using. If you are using Eclipse Kepler(eclipse 4.3), you need to look for ‘Google Plugin for Eclipse 4.3) and click on ‘Install’.

124

Accept the license and click on ‘Next’ to continue installation.

127

It takes some time to download and install the plug-in.

129

While installing you will get a security warning. Just click on ‘Ok’ to continue the installation.

130

Restart the eclipse after the installation of plug-in is completed. After restarting the eclipse, you will see the GWT plug-in added to the eclipse tool bar.

131-1

NetBeans

If NetBeans is your preferred IDE, there is an GWT plug-in available for NetBeans as well.
Launch NetBeans, and in NetBeans ‘Start Page’ click on ‘Install Plugins’.




n1

Alternatively you can navigate to Plugins view by selecting Tools – > Plugins from the NetBeans menu.


n20

In the Plugins Windows, navigate to ‘Available Plugins’ tab.

n2

In the Search textbox, enter gwt and hit Enter. This will return the gwt related plugins for NetBeans.

n3

The GWT plug-in for NetBeans in GWT4NB which is the only GWT plug-in available in the list. So select it to install and click on Install button at the bottom of the Plugins screen.

n5

Click on ‘Next >’ button to start the installation of the GWT NetBeans plug-in.

n6

Select the check box against the license agreement and click on Install to agree to the license agreement and to start the installation process.

n7

GWT NetBeans plug-in is being installed..

n8

When the below message is displayed, just click on Continue to continue the installation process.

n10

Restart the IDE once the installation is completed by selecting against the ‘Restart IDE Now’ and clicking on ‘Finish’.

n11

Once the IDE is restarted, from the NetBeans Menu bar , select File –> New Project. You will see the below New Project window which has a GWT option under the Categories indicating that the GWT Plugin for NetBeans is installed successfully.

n21

Browser Plugins


And we need to install extensions to the browser you are planning to use for running the GWT app in development mode. We will see later what the development mode is, but for now let us install the plugins for the browser to complete our set up of the development environment. If you launch the app in Dev mode without installing the plug-in, the browser will display a message similar to below.

In Internet Explorer:

144-1

On Chrome:

147-1

When you click on Download, On Chrome, you will be redirected to the Chrome extensions page from where you can install the GWT Developer plug-in.

146

Click on ‘FREE’ button to install the plug-in on Chrome browser.

On IE, clicking on ‘Download’ button will download a ‘GWTDevPluginSetup.exe’ set up and launching it will install the GWT developer plug-in for IE.

Restart the browsers after the GWT developer plug-in is installed.

Unfortunately the latest versions of Mozilla Firefox doesn't support the GWT Developer Plugin. So you can’t work in Development mode on latest version of Firefox, but GWT already provides a super dev mode which doesn’t require installing any plug-in during development. So you can use Firefox in super dev mode during development mode.

Conclusion

We completed setting up the required development environment for developing applications in GWT. We can start creating GWT applications !!

Developing Cross Platform Mobile Applications in Java.

This series is a tutorial to develop cross platform mobile applications in Java. Readers need to have fair understanding of Java to understand this series.
The below is the outline of topics that I would want to cover as part of this series. The topics covered are replaced with a link to the blog post and if there is no link against any topic, it means it is still pending.
What type of Application do you want to develop ?
Setting up Java Development Environment.
Setting up GWT Development Environment.
Create GWT Project and understand GWT project structure and Artifacts.
Super Dev Mode, Dev Mode and Production Mode.
Basic Widgets
Forms, Layouts
Event Handling
Ui Binder
RPC Communication
MVP
History
Validation
Logging
Styling
Introduction to mgwt, gwt-phonegap and phonegap
Setting mgwt development environment.
Widgets
Themeing
Server Communication
Local Database
Sample Application
Deploying on Android
Deploying on iOS

Monday, July 14, 2014

Installing Java on Windows

Java is one of the most commonly used programming languages. Installing Java is straight forward. If you want to develop java applications, you need to install Java SDK and if you want to run applications developed in java, you need to install JRE. You need little more than just Java installation to make your development in Java easier. In this post, we will install the below tools required for application development in Java.
  • Java(naturally !!)
    • JDK(Java Development Kit)
    • JRE(Java Runtime Environment)
  • Integrated Development Environment(IDE)
    • Eclipse
    • NetBeans
  • Build Tools
    • Apache Ant
    • Apache Maven
  • Web servers
    • Apache Tomcat
These are the most commonly used tools in java development and the below blog post has information on where to download these tools, how to install and to check if they are installed and configured correctly.

Java


You can download the latest version of Java SDK from the below oracle site.

www.oracle.com/technetwork/java/javase/downloads/index.html

Click on ‘Download’ button highlighted in the below screen to download the latest version of Java SDK.

5

Accept License Agreement to continue to downloads.

9

Select the OS which you are using and the architecture(32 bit or 64 bit) you want to download. This will start downloading the Java SDK.

10
The Java SDK downloaded installer will be similar to the below screen shot. It may vary little bit based on Java version , operating system and the architecture.

j7


Double click on the installer to start Java SDK installation process.

After the installation is triggered, click on ‘Next’ to continue the installation.
 
j8

During the installation process, the below screen will be displayed which provides options for installation. If you want to change the default installation path, click on ‘Change’ and select the location on your hard disk at which you want to install the eclipse. If you don’t want to change the default location or if you are not sure what to do, leave it without changing.
There are options to select/deselect installation of JRE and Java source code. You can choose not to install them but it is recommended to install them, since you cant run the applications you develop without installing JRE. JRE(Java Run Time Environment) is required for running applications developed in Java. Though installing Source Code is not required, it is good to have it installed as you can look up the source code when ever you want to.
Once you are done with the customizations click on ‘Next’ to continue the installation.

 j9

Java SDK is installed.

 j12

After installing Java SDK, the installer will continue to install JRE also as you selected to install JRE while customizing the Java SDK installation.
You can select the location to install by clicking on ‘Change’ and then choosing the location on hard disk at which you want to install the JRE. Similar to Java SDK, If you don’t want to change the default location or if you not sure about what to do, leave the default location. Click on ‘Next’ to start installing the JRE.

j13

The JRE starts installing.

 j14
 
Click on ‘Close’ to complete the installation. The installation of Java SDK and JRE is completed.

j20
Now there are couple of more steps to make Java work and make it integrate better with other Java development tools.
Right click on ‘Computer’ on your desktop and select ‘Properties’ which displays the below screen. Click on ‘Advanced System settings’.
m6
Click on ‘Environment Variables’ in the below screen.
m7
Clicking on Environment Variables will display the below Window. If you want all the user accounts on your system to use Java, then run the below steps on ‘System variables’ section in the below screen. If you want only the user account with which you logged in to use Java, run the below steps in ‘User variables for YYY’ section. ‘YYY’ needs to replaced with the user account name you logged in with.
m8 
Click on ‘New’ button.
Enter the Variable name as ‘JAVA_HOME’.
Enter the Variable value as ‘C:\Program Files\Java\jdk1.8.0’. This will change based on where you installed Java.
Click on ‘OK’ to save the entry.
j1
Now select the ‘Path’ in the list of system variables and click on ‘Edit’ button. When the below screen shows up, add the below text to the existing content in the Variable value.
%JAVA_HOME%\bin;C:\Program Files\Java\jre8\bin
If you are adding this to the end of the existing value, prepend ; to the above text while adding. If you are adding this some where in between the existing content, make sure, you add this after any ; in the existing text and also append ; to the above text while adding. Click on ‘OK’ to save the modifications.
J5
Click on ‘OK’ in the ‘Environment Variables’ and ‘System Properties’ windows to save the modifications. Open the command prompt and run the below command to see if the Maven is working correctly.

Open the command prompt and run the below command to check the Java SDK and JRE installation.

java –version

If the JRE is installed properly, you will see the java version similar to the below screen shot.

 j21
Oracle site has information to guide on Java development.
http://docs.oracle.com/javase/8/


IDE

Integrated Development Environment(IDE) is a suite of developer tools which provides all the tools required by developers for developing the applications. These consists of source code editors, compilers, interpreter, debuggers, build tools, code completion features, options to refactor the code, auto generate the classes from templates, UI's for maintaining VCS etc. IDE's maximize the developer productivity since all the above mentioned features are built into one utility and will help the developers to automate several tasks. It is difficult for even seasoned developers to develop applications just using code editors without using an IDE.
One of the reason Java is very popular is due to huge tooling support it has. Java is supported by several Open source and commercial IDE's. The most common open source IDE's include Eclipse and NetBeans while some of the popular commercial IDE's are Myeclipse( built on top of eclipse and so mostly similar but with much wider support and more sophisticated support for more frameworks) and IntelliJ IDEA.
We will install eclipse and NetBeans which are the most popular open source Java IDE's.
 

Eclipse

Eclipse is free and open source IDE written mostly in Java. By installing various plugins, Eclipse can also be used to develop applications in several other programming languages like C, C++, JavaScript, PHP, Python, Scala, Groovy, Ruby etc part from Java. Eclipse was initially developed by IBM and was open sourced in 2001.Eclipse uses plugins heavily for providing all the functionality and for supporting several frameworks in Java and also support for other programming languages.It can run on Windows, Linux, Solaris and Mac OS X..
Download the latest version of eclipse from the below Eclipse download site.
https://www.eclipse.org/downloads/
eclipse
You need to select the OS you are using and download the 32 bit or 64 bit version based on the what your system supports. You need to download ‘Eclipse IDE for Java EE Developers’ .Unzip the downloaded eclipse zip folder to a location on your hard disk and launch eclipse by double clicking ‘eclipse.exe’.
121-1
  Eclipse site has more information on how to use Eclipse.
http://www.eclipse.org/users/
 

NetBeans

NetBeans is also a open source IDE written in Java and supports C, C++ and PHP development apart from Java. NetBeans was acquired by Sun Microsystems in 1999 and was open sourced in 2000. Similar to eclipse, NetBeans can also run on Windows, Linux, Solaris and Mac OS X. NetBeans supports development of several type of Java applications like Java SE, Java ME, Java FX, Web, EJB and Mobile applications out of box without installing many modules. It also provides support for build tools like Apache Ant, Apache Maven and version control systems like Subversion, Git, Clearcase and Mercurial.
NetBeans can be downloaded from the below site.
https://netbeans.org/downloads/
Since we want to set up Java environment, we can choose to download either Java SE or Java EE version of NetBeans. If you want to develop web applications, you need Java EE version and if you want to develop applications only in Java SE(core java), you can download Java SE version. Java EE version is Java SE Version + capabilities for Java EE apps, so it doesn’t do harm to download this if you are not sure. How ever if you want to develop Java ME apps, you need click the ‘Download’ under ‘All’ column.
 301
NetBeans will start downloading automatically. If it doesn’t, click on ‘download it here’ link the below page.
302
The downloaded NetBeans installer will be similar to below. The name will vary little bit based on the NetBeans version downloaded and also the flavor of the downloaded NetBeans. Double click on the installer to start installation.
303-1
The NetBeans installer is started.
304
NetBeans installer is initializing, just wait for a moment before next screen for customizing the NetBeans installation shows up.
305
In the below screen, you can select the application servers you want to install with NetBeans. GlassFish and Tomcat are the servers supported by NetBeans automatically and so select them if you want to install. If you are not sure, just select them as having them installed isn’t going to cause any harm. Then click on ‘Next >’ to continue to the next screen.
307
You need to accept the license agreement and click on ‘Next >’ to continue installation.
308
If you want to create JUnit test cases for your application(why not ?), accept the license agreement for installing JUnit and click on ‘Next >’ to continue installation. If you don’t want to install JUnit, you can select ‘Do not install JUnit’ and click on ‘Next >’ button to continue installation.
309
In the below location, you can select the NetBeans installation location on the hard disk and also the JDK path for the NetBeans to use. The installer provides the default options. If the provided Java SDK path is correct, leave it as it is else click on Browse to select the correct path. If you want to change the  NetBeans installation path, click on Browse button against it and navigate to the location where you want to install NetBeans. Click on ‘Next > ‘ to continue installation once you are done with selection of NetBeans Installation directory and Java SDK path.
311
The below screen will be displayed if you selected to install the GlassFish server. Select the location at which you want to install the GlassFish server and also select the JDK you want the GlassFish server to use. The installer provides the default paths. You can change them if you wish by clicking on ‘Browse’ button and navigating to your preferred directory. Once you are ready, click on ‘Next >’ to continue NetBeans installation.
312
In the below screen, the installation path of the Tomcat is displayed. You can change it by clicking on ‘Browse’ button and navigating to the preferred directory if you wish to, else leave it to default location suggested by the Installer. Click on ‘Next > ‘ to continue the installation.
313
The below screen displays the summary of the installation locations you selected on all the previous screens. If you want to change any of those, you can click on ‘Back’ and make the required modifications. Click on ‘Install’ to start installation of NetBeans.
314
The installer starts installing the NetBeans IDE. It will take some time to complete the installation as the installation is more than 600 MB.
315
Still installing….
316
Installing updates and JUnit.
319
The installation of NetBeans IDE is completed. Click on ‘Finish’ to close the Window.
320
Double click on the NetBeans shortcut on the desktop to launch NetBeans.
n1
More information on using NetBeans is available the NetBeans site provided below.
https://netbeans.org/kb/index.html

Apache Maven

Apache Maven is a open source build automation tool written in Java. Maven has description on how a software is build and its dependencies. Maven can be used to build and manage projects written in C#, Ruby and Scala etc. Maven uses Project Object Model(POM) for maintaining the projects. Since this was written in Java, this also requires Java to be installed on the system.
Download the latest version of Apache Maven from the below site.
 http://maven.apache.org/download.cgi
m2
Click on apache-maven-3.2.2-bin.zip. The file name may vary a little bit based on version you are downloading.
m3
The downloaded maven zip file will look similar. Since the file name contains the version number, the file name may change based on the version of Maven you downloaded.
m4
Extract maven to your preferred location on your hard disk. The extracted location will be Maven Home location. ex: I have extracted Maven to ‘C:\software\apache-maven-3.2.2’ and so ‘C:\software\apache-maven-3.2.2’ will be maven home location on my system.
m5
Since we are done  with the extraction of maven, let us check if we can run maven commands and execute them successfully. Run the below command to check if Maven is working correctly.
mvn –version
m14
Looks like maven is still not working correctly. We have extracted maven , but we didn’t do the necessary configurations for OS to recognize the maven commands. We still need to do a couple of configurations to run maven without any issues.
Right click on ‘Computer’ on your desktop and select ‘Properties’ which displays the below screen. Click on ‘Advanced System settings’.
m6
Click on ‘Environment Variables’ in the below screen.
m7
Clicking on Environment Variables will display the below Window. If you want all the user accounts on your system to use Maven, then run the below steps on ‘System variables’ section in the below screen. If you want only the user account with which you logged in to use Maven, run the below steps in ‘User variables for YYY’ section. ‘YYY’ needs to replaced with the user account name you logged in with.
m8
Click on ‘New’ button.
Enter the Variable name as ‘M2_HOME’.
Enter the Variable value as ‘C:\software\apache-maven-3.2.2’. This will change based on where you extracted the Maven.
Click on ‘OK’ to save the entry.
M10
Now select the ‘Path’ in the list of system variables and click on ‘Edit’ button. When the below screen shows up, add the below text to the existing content in the Variable value.
%M2_HOME%\bin
If you are adding this to the end of the existing value, prepend ; to the above text while adding. If you are adding this some where in between the existing content, make sure, you add this after any ; in the existing text and also append ; to the above text while adding. Click on ‘OK’ to save the modifications.
M12
Click on ‘OK’ in the ‘Environment Variables’ and ‘System Properties’ windows to save the modifications. Open the command prompt and run the below command to see if the Maven is working correctly.
mvn --version
m13
You can see the version of maven that is installed, maven home and the java version used and other system details. These may vary based on Maven, Java versions used and also based on your system specifics.
More information on Maven is available at the below site.
http://maven.apache.org/run-maven/index.html

Apache Ant

Apache Ant(Another Neat Tool) is an open source java tool for automating the software build process. It was developed to build Apache Tomcat and was released as an stand alone Apache tool on July 19, 2000. It uses XML for describing the build process and its dependencies. Similar to Java this is cross platform and can run on any OS supported by Java. Since this is developed in Java, this requires Java installation to work.
Apache Ant can be downloaded from the below site.
http://ant.apache.org/bindownload.cgi

 a1
Download the latest version of Ant Zip archive(highlighted in Green) from the downloads page.
a2
The download Ant zip archive will look similar. The name may vary a little bit based on the version of Ant downloaded.Extract it to your preferred location on the hard disk.
a3
The extracted Ant installation will look similar to below. There is no installation for Ant and the location to which the Ant is extracted is your Ant home location. Since I have extracted Ant to ‘C:\software\apache-ant-1.9.4’, that location is my Ant’s home.
a4
Now let us open the command prompt and run the below command to see if Ant is working correctly.
ant -version
a11
As you can see, ant is not working. There is nothing work with the installation. We just extracted the Ant, but the OS still doesn’t know any thing about Ant.
You need to make a couple of configurations for your system to recognize Ant installation. You need to define ANT_HOME and add Ant executable to the Path, so that OS will recognize the Ant commands whenever you run them. Right click on ‘Computer’ on your desktop and select ‘Properties’ which displays the below screen. Click on ‘Advanced System settings’.
a5
Click on ‘Environment Variables’ in the below screen.
a6
Clicking on Environment Variables will display the below Window. If you want all the user accounts on your system to use Ant, then run the below steps on ‘System variables’ section in the below screen. If you want only the user account with which you logged in to use Ant, run the below steps in ‘User variables for YYY’ section. ‘YYY’ needs to replaced with the user account name you logged in with.
a7
Click on ‘New’ button.
Enter the Variable name as ‘ANT_HOME’.
Enter the Variable value as ‘C:\software\apache-ant-1.9.4’. This will change based on where you extracted the Ant.
Click on ‘OK’ to save the entry.
A8
Now select the ‘Path’ in the list of system variables and click on ‘Edit’ button. When the below screen shows up, add the below text to the existing content in the Variable value.
%ANT_HOME%\bin
If you are adding this to the end of the existing value, prepend ; to the above text while adding. If you are adding this some where in between the existing content, make sure, you add this after any ; in the existing text and also append ; to the above text while adding. Click on ‘OK’ to save the modifications.
a9
Click on ‘OK’ in the ‘Environment Variables’ and ‘System Properties’ windows to save the modifications. Open the command prompt and run the below command to see if the Ant is working correctly.
ant -version
a10
The output displayed should look similar to above with differences in the version and the compiled date due to difference in the Ant version installed.
More information on Apache Ant is available at the below site.
http://ant.apache.org/manual/index.html

Apache Tomcat

Apache Tomcat is an open source web server and servlet container. It is one of most commonly used web containers running several millions of Java web applications across the world. It has support for clustering and High availability.
The latest version of Tomcat can be downloaded from the below site.
http://tomcat.apache.org/download-80.cgi

401
There are multiple options to download. If you want to run Tomcat as a service on your system, You need to download ‘32-bit/64-bit Windows Service Installer’. If you want to run Tomcat as a batch application, you can download 32-bit Windows.zip or 64-bit Windows.zip based on operating system you have and the architecture of Java you installed.
402
First we will install the Tomcat in service mode and later we will install it to run in batch mode. So click on ‘32-bit/64-bit Windows Service Installer’ to download the Windows installer. The downloaded executable should look similar while file name can vary a little bit based on the version of Tomcat downloaded. Double click on the executable to start the installation.
403
Click on ‘Next >’ button to continue the installation.
404
Click on ‘I Agree’ to agree the license agreement and to continue the installation.
405
The below screen has option to select the ‘Type of Installation’. By default, ‘Normal’ is selected.
406
You can select any of the other options available like ‘Full’. Based on the selection, the options below the installation type will be selected/deselected indicating which components will be installed or not installed. Click on ‘Next >’ to continue installation.
407
You can configure the Tomcat ports and provide the manager user name and password to manage the Tomcat remotely through web.
By default Tomcat runs on 8080 port in development environment and unless you have some other application running on that port , you need not change it.
You can provide a service name with which you want to view the Tomcat in Windows Services.
409
Also provide the admin and manager user name and password.You can remove any of these roles or all these roles in the ‘Roles’ textbox if you don’t want them on the Tomcat installation. Click on ‘Next >’ to continue the installation.
410
Configure the path of JRE you want this Tomcat installation to use and click on ‘Next > ‘ to continue installation.
411
Configure the location at which you want to install Tomcat and click on ‘Install’.
412
Installing Tomcat…
413
The Tomcat is installed on your system. Click on ‘Finish’ to complete the installation and launch the Tomcat.
414
Tomcat is launching.
415
A similar icon to the one highlighted below will be displayed on the task manager.
416
To check if the Tomcat is installed properly, open the browser and type in the below url.
http://localhost:8080
If you changed the port number while installing Tomcat , you should use that instead of 8080.
If the Tomcat is installed properly, you should see a similar page.
t1
You can start and stop Tomcat from the Windows services. From the Windows home, in Run, type ‘services.msc’ and select ‘services.msc’ from the list. It will show the Windows Services.
The tomcat is installed with the service name you provided while installing. You can click on ‘Stop’ to stop Tomcat and on ‘Restart’ to stop and start the Tomcat(usually for reloading the apps after modifications) and ‘Start’ to start the Tomcat.
t2
Alternatively, you can look up for ‘Apache Tomcat 8.0 Tomcat8’ in your programs and select ‘Configure Tomcat’ which will display the below Window.
In this window, you can stop, start, pause and restart the Tomcat. You can also change the startup type. If it set to automatic, it will be started immediately after the system is started and will be running in the back ground all the time. If it is set to Manual, you need to start it whenever you need it.
417
In the Java tab of the same window, you can view the Java properties of the Tomcat. You can change the JRE, if required. Also you can change the heap settings by setting the heap options in Java Options. All the normal Java options(GC algorithm, heap size  etc) can be set in the Java Options.
419

408

Now we will install the Tomcat as a batch application. But it is easier to install the Tomcat as a service and also managing the Tomcat as a service is easier for starters than maintaining it as a batch application.
Click on 32-bit Windows.zip or 64-bit Windows.zip  based on your system architecture to download the Tomcat.
The downloaded zip will be similar with slight variation in the name due to the Tomcat version downloaded. Extract the zip to your preferred location on your hard disk.
421
The extracted Tomcat folder will be similar to this.
422
To launch the Tomcat, go to ‘bin’ directory inside the Tomcat installation and double click on ‘startup.bat’.
424
The Tomcat will be launched in the command prompt.
t3
Similar to service mode, type the below link in the browser to check if Tomcat is installed and launched properly.
http://localhost:8080/
If installed and started correctly, you will seen the below local host home page.
t1
If you observe, we didn’t provide any options for JRE or ports like we did in the service mode. Obviously Tomcat used the system default JRE and also used the default port in this case. Also we don’t have the Tomcat properties Window where we had options to start, stop, pause and restart tomcat and also configure several Java options. Some of these options are not available and some options like JRE, ports etc needs to be configured in the xml files available in the ‘Conf’ folder of the Tomcat installation directory.So unless there is some thing preventing you from installing Tomcat in service mode, run Tomcat in service mode.
More information on Tomcat is available at the below site.
http://tomcat.apache.org/tomcat-8.0-doc/index.html

Conclusion

We installed the required tools for Java development. It many look little bit over whelming looking at the number of tools installed, but it is not required for every one to have all these tools installed. You may choose to use only some of these, like between eclipse and NetBeans, you may use one IDE you are comfortable with. Similar with the build tools and web server. Based on the type of applications you are using, you may not need a web server at all. Or you can still make the applications work without using any build tool or any IDE. All of these just increase developers productivity once they are mastered. So just don’t get lost or stop looking at these huge list of tools required.  Once you know how to write Java programs, you will understand the advantage of using an IDE and similarly once you start creating projects you will understand the need for build tools.Start taking it step by step !