Page History
The following are complete instructions for setting up the a standard development environment for Java and Open Source projects. Generally, the instructions assume an MS-Windows based operating system.
Note: These are recommendations for a complete system. Naturally, you need to tailor these instructions iyouif you're using some a different source code control system from Subversion (for example).
Include Page | ||||
---|---|---|---|---|
|
On this page:
Table of Contents | ||
---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
- Go to http://www.eclipse.org/downloads/ and install the latest version of Eclipse IDE for Java Developers.
- Make sure that your 32/64 bit choice matches the Java JDK you installed (or else Eclipse will fail to start with a JVM error of -1).
- Unzip it to the folder of your choice.
- Execute Eclipse.
- Specify a folder where your workspace will be located (can be anywhere).
- Check to make sure your Eclipse is using the correct JDK version:
- Start Eclipse.
- Open Menu: Window/Preferences
- Go to Java/Installed JREs.
- Check that Java 6 (or later) is installed and selected.
- Must specify the JDK 1.7 (not a JRE) AND select it; if not, add the new VM and then select it as the default.
- This is required so that new Maven projects will build correctly.
- When creating new Java projects, make sure that your JRE choice is "Use default JRE", which should be pointing to your JDK.
- Install the "Aspire Coding Profile" for Aspire coding standards: media:Aspire_Java_Coding_Profile.xml
- Open up Window / Preferences.
- Go to Java / Code Style / Formatter.
- Click "Import..."
- Locate the "Aspire Java Coding Profile.xml" file.
- Click "Apply".
- All this does is set the indentation to 2 spaces (no other coding style issues are important).
Install
subversionSubversion into Eclipse
- Inside eclipse, go to: Help / Install New Software...
- Under "Work with:" enter:
- Eclipse Mars (4.5): http://subclipse.tigris.org/update_1.12.x (has support for 1.9 SVN)
- Eclipse Kepler (4.3): http://subclipse.tigris.org/update_1.10.x (has support for 1.8 SVN)
- Eclipse Juno (4.2) might work better with: http://subclipse.tigris.org/update_1.8.x
- Eclipse (3.5) might work better with: http://subclipse.tigris.org/update_1.6.x
- Mark all checkboxes and click Next.
- Review items and click Next.
- Accept the license, click Finish, and let it install.
- Restart Eclipse.
- Create a new SVN Repository Location by going to Window / Open Perspective / Other… and selecting SVN Repository Explorer.
- Right click inside the SVN Repositories window and select New / Repository Location.
- Enter the URL of your SVN repository as the "Url" and click Finish.
- Search Technologies' employees should use https://svn.searchtechnologies.com/svn/aspire.
- Community and Enterprise users DO NOT have access to the Search Technologies SVN repository and should use the appropriate URL for their SVN servers and repositories.
- The application will try to connect; if it connects successfully, you will be prompted for user and password (check the box to avoid being asked to login several times).
- Search Technologies' employees should use their standard Search Technologies username and password.
Are you using a 64-bit JVM for Eclipse?
- You may see "JavaHL" missing library errors when you go to your Subversion repository.
- If this is the case, you may need to install a 64-bit version of "JavaHL". Go to http://www.sliksvn.com/en/download and download and install the "SlikSVN" 64-bit Windows subversion client. It should put the SlikSVN binaries on your Windows PATH environment variable (check this). Then restart Eclipse and you should be fine.
- See http://subclipse.tigris.org/wiki/JavaHL for more details.
Anchor InstallMaven InstallMaven
Install Maven
Into InstallMaven | |
InstallMaven |
into Eclipse (m2eclipse)
Note |
---|
Not need it by Eclipse Mars (4.5) and above |
Install the plugin:
- Go to Help / Install New Software...
- Under "Work with" enter:
- For Eclipse Mars (4.5): Already has integration with maven
- For Eclipse Galileo (3.5): http://m2eclipse.sonatype.org/sites/archives/m2e-0.10.2.20100623-1649/
- For Eclipse Helios (3.6) / Eclipse Indigo (3.7): http://m2eclipse.sonatype.org/sites/m2e
- For the latest version of Eclipse: http://download.eclipse.org/technology/m2e/releases
- Click to install the following items:
- Maven Integration (the whole thing)
- Click Next/Finish/Accept/Restart as necessary to complete the installation.
- Set Eclipse to use the jdk1.7.0_xx (this is recommended by m2eclipse):
- Edit the "eclipse.ini" file located in your eclipse directory.
- Add the following two lines to the top of the file:
- -vm
- C:\Program Files\Java\jdk1.7.0_xx\bin
- (specify the exact location of your JDK-7 binary)
- Add the following two lines to the top of the file:
To test that m2eclipse is working correctly:
- Restart Eclipse.
- Open up the console window: Menu: Window / Show View / Console
- Look for the open-console toolbar (the console with a + sign), then select "Maven Console."
- Make sure there are no errors (any errors will be shown in red).
- Wait for it to download the maven repository index.
Optional (install additional plugins):
- Return to Help / Install New Software...
- After the "Work with:" prompt, enter: http://m2eclipse.sonatype.org/sites/archives/m2e-extras-20101029/
- This is an older version 0.10. When the newer version has all the elements we need, it will be at: http://m2eclipse.sonatype.org/sites/m2e-extras
- The missing element was "Maven SCM handler for Subclipse".
- Click to install the following items:
- Maven Optional Components / Maven SCM handler for Subclipse
- Maven Optional Components / Maven issue tracking configurator for Mylyn 3.x
- Maven Project Configurators / WTP
In order to get Maven to Run inside Eclipse, you will need to change the JRE to JDK 1.7 or 1.8 as appropriate according to your Aspire target version:
- Window / Preferences
- Java / Installed JREs
- Add...
- "Standard VM"
- Click "Directory...", then locate your JDK folder, click on the JDK folder and then hit OK & Finish
- Back in the "Installed JREs" dialog, make sure your JDK is selected.
- Click OK.
Anchor InstallCygwin InstallCygwin
Install Cygwin with Subversion Command-Line (Optional)
InstallCygwin | |
InstallCygwin |
If you are running in Windows, then Cygwin is an extremely valuable tool for managing very large files.
- Go to http://www.cygwin.com/ and install the Cygwin setup.exe program
- Run the setup.exe program, then follow the instructions.
- Install cygwin into C:\cygwin.
- Make sure that Subversion is selected when installing packages.
- In the 'Devel' category, make sure that "subversion: A version control system" is selected.
- Once installed, add the following environment variables to your Windows environment:
- Go to Control Panel / System / Advanced System Settings / Environment Variables...
- Add variables for:
- CYGWIN => nodosfilewarning
- Add ";C:\cygwin\bin" to the end of your PATH variable.
- This will allow all cygwin commands to be executed directly from DOS Command windows.