Follow this Blog!

Aug 18, 2010

f Comment

How To Install And Configure Eclipse IDE for Java

MenuInstall WAMP, Java, Hibernate, Eclipse
Install and Configure WAMP
Install and Configure Java
Install and Configure Hibernate
Install and Configure Eclipse
AmazonEclipse is a FREE open source full featured IDE for developing software, mostly for Java and PHP. It's incredibly powerful and is comparable to many other costly IDEs that do similar things. If you are developing Java applications or PHP applications I sincerely recommend that you use Eclipse IDE! It will make your software development life so much smoother and easier!

My Java Eclipse IDE's version is as follows:

Eclipse IDE for Java Developers
Version: Helios Service Release 1
Build id: 20100917-0705

Follow the following steps to install and configure Eclipse correctly.

Step 1: Download the latest version of Eclipse IDE
Download the latest version of 32-bit Eclipse IDE for Java Developers from Eclipse's download website at Unzip and save contents to C:\eclipse-java-helios-win32\.

Even if you are using a 64-bit machine you still should download 32-bit version of both Eclipse and Java JDK otherwise you'll get the following error:

Failed to load the JNI shared library "C:\Program Files(x86)\Java\jdk1.6.0_20\bin\..\jre\bin\client\jvm.dll"

Step 2: Run Eclipse
Before running Eclipse I'd recommend that you open Eclipse configuration file and increase the memory settings so that Eclipse runs faster. Here's my eclipse.ini (located in same folder as eclipse.exe):
Then run Eclipse by clicking C:\eclipse-java-helios-win32\eclipse.exe. Its user interface, known as a workspace, looks like the following:

Eclipse Helios Windows 32 Bit Java IDE

Step 3: Create a New Project and Setup JRE
Create a new Java project and specifies the root of the code base as the project Location. One thing you should do is use the JRE you installed earlier instead of the JRE that comes with Eclipse. Follow the following steps:

Project -> Properties -> Java Build Path -> Click 'JRE System Library [jre6]' -> Libraries -> Edit... -> Alternate JRE -> Installed JREs -> Add... -> Standard VM -> Navigate to C:\Program Files (x86)\Java\jdk1.6.0_20\jre in 'JRE home' text field -> Finish (note every jar in C:\Program Files (x86)\Java\jdk1.6.0_20\jre is listed in 'JRE system libraries' -> pick jdk1.6.0_20 in 'Alternate JRE' drop down menu.
The actual window looks like:

Eclipse Java IDE JDK Selection

These steps provide the correct JRE for the code you run in eclipse. If something is not resolved simply drop the corresponding Java jar in C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext and restart Eclipse and the unresolved should become resolved! This is because Eclipse now understands C:\Program Files (x86)\Java\jdk1.6.0_20\jre is the JRE that should be used, and therefore Eclipse will look into C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext for any external jars to resolve the unresolved packages or libraries!

Alternatively you could've used the original JRE that comes with Eclipse installation. Suppose the original JRE is C:\Program Files (x86)\Java\jre6. Then you would put external jars in C:\Program Files (x86)\Java\jre6\lib\ext folder. If your Java code base is compatible with the original JRE then this approach will work.
Congratulations! You've successfully installed Apache, MySQL, PHP, Java, Hibernate, and Eclipse IDE for Java. You are ready to crank out some serious killer app! Questions? Let me know!

◀ Install and Configure Hibernate
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Google or Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael