Java JDK
You will probably have Java installed, but it will only be the JRE, which will hot have all the environment variables established. The JDK can be found by searching on Google and it will probably be the top link.I have this time around down loaded the version 7 JDK from here (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html). (Don't forget to pick the right version and accept the licensing terms).
On a windows PC the easiest location to install all of these files is under a single directory structure ... with NO spaces in the name.
I will use "c:\development" throughout this post (cos it's what I use).
So:
- Download the JDK installer;
- Place it in a new folder "c:\development\java";
- Run the installer (as administrator);
- Wait for it to start & press the next buttons;
- At the Optional Features deselect the "Public JRE" as you already have one;
- Change the installed directory to "c:\development\java\jdk1.7.0_45\" (where 1.7.0_45 is the JDK version);
- Now install by pressing next;
- Set an environment variable JAVA_HOME = C:\development\java\jdk1.7.0_45;
- Add to the PATH environment variable %JAVA_HOME%\bin;
- Open a command prompt and check that the maven command "java-version" runs and gives the correct version.
Maven
Since my last version of this install guide I have been working with Maven, which is a build tool. I had produced a nice set of ANT scripts to do what MAVEN does but I have decided that this is just too much like reinventing the wheel.So:
- Download the zip;
- Place into a new folder "c:\development\maven";
- Extract the files to "C:\development\maven\apache-maven-3.1.1";
- Create an environment variable M2 = C:\development\maven\apache-maven-3.1.1;
- Add to the PATH environment variable %M2%\bin;
- Open a command prompt and check that the maven command "mvn -version" runs and gives the correct version.
Eclipse
With the JDK set up now install the version of Eclipse you prefer.My current favorite is the Spring Tool Suite (STS) since it comes with may of the tools and plugins pre-installed.
So:
- Download the latest STS; from http://spring.io/tools/sts/all ensuring you get the right version for your OS
- Place it in a new folder called "c:\development\eclipse";
- Run the installer (as administrator);
- Accept the licensing agreement;
- Accept the default installation location which should be C:\development\eclipse\springsource;
- Install all the toys;
- Set up the JDK path to be C:\development\java\jdk1.7.0_45;
- It may complain that a 32-bit or 64-bit version is needed which means you made a mistake at step #1;
- When prompted for a short cut group call it "Java Development";
- Launch the tool set to ensure it works;
- When prompted for a workspace create one with out spaces ie. "C:\development\projects\default-eclipse";
- You may be prompted to install any updates if they exist;
- Create a "Hello World" project and check whether you have Java set up correctly;
Eclipse plugins (optional)
Having installed Eclipse it is now a mater of installing a set of plugins. These vary accourding to taste and your development purpose; mine is Java web development.I've written about the set of plugins I use before (here, & here and here).
I'm not going to detail which ones I'm just going to list those that I use and include a 'bookmark.xml' import to list them.
The Plugins I use are:
- Sysdeo JSP/Tomcat Manager - This plugin allows you to start or stop the tomcat environment and perform remote debuging;
- Log4e - Log4E is an Eclipse Plugin which helps you to use your logger easily in Java Projects;
- StartExplorer- This plug-in gives you a convenient way to examine a file or a folder outside the Eclipse workspace with your file manager or open a shell/cmd.exe and do all this by adding a few entries to Eclipse's context menus.
- SubEclipse - Links to your subversion source control.
- Aptana Studio - HTML, CSS etc editing
Interesting ones:
XAMPP
This has to be the sweetest install of the set. It is an entire Apache LAMP stack installer with Tomcat included.The best version if you are installing to windows is the full instalation tool sooner than the zip version.
So:
- Download the latest XAMPP;
- Place it in a new folder called "c:\development\xampp";
- Run the installer (as administrator);
- Follow the next buttons and select all the toys;
- Select the installation to c:\development\xampp\1.8.3 (where 1.8.3) is the current version;
- Wait a long time for the installation top complete;
- Start the control panel and start up HTTPD;
- Open a browser and check http://localhost, if you don't get a page titled XXXX then you may have something else running on port 80.
The usual culprits are IIS or Skype these systems need to be configured to use any thing other than 80,443, 8080, 8443 (which are all ports used by Httpd & Tomcat);
Shut those services down or change their ports (see articles on IIS or Skype respectivly) and retry (PS. don't forget to force your browser to refresh the page or you could be thinking it is still there). - Tomcat should have its admin user set up.
You can check this by browsing to http://127.0.0.1:8080/manager/status.
If it fails shut down tomcat & edit the web-users.xml file (in the above config this is C:\development\xampp\1.8.3\tomcat\conf\web-users.xml);
Add a set of nodes as follows:<role rolename="manager-gui"/> <user username="tomcat" password="s3cret" roles="manager-gui"/>
Then restart.
No comments:
Post a Comment