Category Archives: Eclipse

eclipse tips , tricks and tutorials

Eclipse Shorcuts

Shortcuts are among the effective ways to increase your speed and efficiency .Eclipse apart from standard shortcuts like CTRL+A provides many other shortcuts using which you can increase your productivity.Below I’m listing the 10 essential eclipse shortcuts which every eclipse user should know to work more effectively.

Organize imports.Press this combination to import all missing classes which is needed to run your code.Also this will remove all unused classes.

Delete a row.No need highlight the entire text and press delete or use mouse , just press CTRL+D and you are done.

One of the most effective eclipse shortcut opens a search dialog to search form recently used resources.U can any patter like Foo* to search all files whose name starts with foo prefix.eclipse shortcut ctrl+shift+r


Search .Use this eclipse shortcut to search any class ,method ,string within text .And a lot of other things.

Another important eclipse shortcut.Highlight an object and press F3 to go to the object declaration.Select a class name and press F3 to view class definition.

6.ALT+Left/Right arrow
Used for navigating the code.Lets say you are in class A and there is an object of type B in it you pressed F3 on that and moved to class B, now you want to go to class A again simply press ALT+Right arrow if you again want to go to class B press ALT+Left Arrow.

7.CTRL+SHIFT+\ or /
Add and remove block comments around a piece of code.

Move between perspectives.

format ,use this eclipse shortcut to format your ugly looking code .

Quickfix , use this eclipse shortcut to see quickfixes available for any errors or warnings.

Though there are many more shortcuts available in eclipse but I mentioned only those which I think are a kind of must know , if u think I forgot something important let me know I will add it.

Failed to load the JNI shared library :Eclipse Error

I recently downloaded the 64 bit version[eclipse-SDK-3.7.1-win32-x86_64] of eclipse for windows 7 .But on when I tried to run the eclipse.exe file , the following error message was displayed.

” Failed to load the JNI shared library  c:\Program Files(x86)\java\jdk1.6.0_25\bin\..\jre\bin\client\jvm.dll\ “

As displayed here:

eclipse error

Failed to load the jni shared library :Eclipse Error

What’s the reason for this Error ?

1.You have downloaded the 64 bit version of eclipse but are using the 32 bit jdk.

2.For using 64bit version of any of the eclipse ide, you have to install the 64 bit version of jdk[jdk-7u2-windows-x64.exe].

How to solve the problem:

1.Download the 64 bit version of jdk .

2.Install it .

3.Set the value of JAVA_HOME enviornment variable to C:\Program Files\Java\jdk1.7.0 [default installation].

I’ll recommend try to start eclipse now before going to next step

Still not able to launch workspace? Do this

Modify the  eclipse.ini file

1.Eclipse startup is controlled by the options in eclipse.ini file present in eclipse installation directory it contains command-line options that are added to the command line used when Eclipse is started up.

2.Now use the -vm option to specify pate to the java executable which u want to with this eclipse modify the file as shown here:
initial eclipse.ini file present

eclipse.ini before before

eclipse.ini before before

after modifying eclipse.ini

eclipse.ini after modification

eclipse.ini after

3.Note that u have to specify the full path to the javaw.exe file with javaw.exe added to it  not just the path to it different from what we do while specifying JAVA_HOME .                          Visit eclipse wiki page for more information eclipse.ini.
This is a kind of workaround if u are facing problems in specifying the jvm path

Now Run eclipse.exe and enjoy the 64 bit version.