Posts

Showing posts with the label Eclipse

Setting up Lombok with SpringToolSuite and Intellij Idea

Image
Lombok is a java library that you can plug into your editor which will automatically generate code in .class file instead of in source file. E.g:   getters, setters toString, equals, hashcode, builder, loggers, and many others. In this tutorial, I’ll talk about configuring it in two of the most popular IDEs- IntelliJ IDEA and Spring Tool Suite. Check my Github repo to learn project Lombok using java source code. Note: Step for installing the plugin for Eclipse and Spring tool Suite (STS) are the same. Steps to configure Lombok in STS Download Lombok jar from the Lombok site. Double click on Lombok jar which will open below Installer wizard, Choose IDEs in which you want to install. If your not IDE is not listed then you can browse using Specify location tab. Once selected, click on Install/update button and you are done. Steps to configure Lombok in IntelliJ IDEA Open IntelliJ Idea and click on File-> Settings… Click on Plugin opt...

How to upgrade ANT in Eclipse ?

To upgrade the ANT into the Eclipse, First you need to download the latest version of ANT anywhere on you machine. Once you are done with the download then go to Eclipse → Windows → Preferences → Ant → Runtime → Ant Home and Select the downloaded folder. Now your Eclipse will use the latest version of ANT :)

How to create Spring MVC project using Maven and Eclipse

Image
This blog will show you how quickly you can  create a Spring MVC project and get it up and running, using the Maven archetype called spring-mvc-archetype . Note: First You should verify that the Maven Integration for FTP is already installed in your eclipse, If not first installed and then create a new project. Steps : In Eclipse IDE, Goto  File > New > Project Select  Maven > Maven Project and click  Next . Make sure you don’t check the option Create a simple project (skip archetype selection) , and click Next . In the next screen, Select Catalog as All Catalogs , Archetype as spring-mvc into the Filter   and select  maven-archetype-webapp in the artifact list as shown below :     In case, If you don't see the above artifact in your Archtype then Click on "Add Archetype" and Add : Archetype Group Id: co.ntier Archetype Artifact Id: spring-mvc-archetype Archetype Version: 1.0.2 Repository URL: http:...

Eclipse - Tips & Tricks

This article is for those who use Eclipse. Keyboards shortcuts are very important for comfortable and quick editing. Here are the list of most important shortcuts in Eclipse : For a full list of shortcuts, you can also check by pressing Ctrl+Shift+L. Ctrl +3 Focus into the Quick Access search box which allows you to execute any Eclipse command. Ctrl+SHIFT+T Search dialog for Java Type, Start typing the name and the list gets smaller. Try typing the capital letters of the class only (e.g. type "NPE" to find "NullPointerException") Ctrl+SHIFT+R Search dialog for resources, e.g. Xml files, text files, or files of any other type. Ctrl+E Open Editor Drop down, Presents a popup window listing currently opened files. Ctrl+O Quick Outline, Show all methods of the current class, Press Ctrl+O a second time to include inherited methods. Ctrl+SHIFT+space Context Information Ctrl+Shift+O Organize Imports, Adjusts the imports ...

Debug Java applications remotely with Eclipse

Image
Remote debugging is a way of debugging any process running on some other location from your development machine. Local debugging is the best way in my opinion and should always be preferred over remote debugging but if local debugging is not possible and there is no way to debug your process then remote debugging is the solution. Many of us work on a project which runs on Linux operating system and we do development mostly on Windows. Eclipse provides us most useful feature called " Remote debugging " by using which you can debug your Linux running process from your windows machine. Now let's see how we can setup remote debugging in Eclipse: Just take a example of a simple program that we want to be debugged: package com.tutoial.debugger; /**  * @author abdul  *  */ public class Debug {     public static void main(String args[]) {         for(int i=1; i<=10;i++) {      ...

java.lang.IllegalStateException: "Workbench has not been created yet"

I’ve been working with OSGi for quite awhile and have faced a problem "Workbench has not been createt yet" issues. I was getting this error, When i was trying to run OSGI plugin from Eclipse and I guess many of you must have face this problem. So i am writing a little bit about how to resolve this issue so others don’t repeat the same mistakes. From a good article on eclipsezone: java.lang.IllegalStateException: Workbench has not been created yet This usually comes when someone tries to run a Java application against an OSGi bundle with java -classpath .... . It really means that the workbench plug-in hasn't started yet, and so calls to getWorkbench() fail. This is essentially a race condition, and can be solved by either expressing an explicit dependency on that bundle or bumping up that bundle to a higher start level than the workbench. Generally not seen, but if it is, that's what's happening. Now to set the bundle to a higher start level than the work...

How to install Subversion,Google App Engine,Android with Eclipse.

Image
This is tutorial assumes you already have Eclipse installed. You can install the any plugin for Eclipse using the Software Update feature of Eclipse. To install the plugin, using Eclipse: Select the Help menu > Install New Software. ... In the Work with text box, enter: For Subversion: http://subclipse.tigris.org/update_1.0.x For Android: https://dl-ssl.google.com/android/eclipse/ For Google App Engine: Eclipse 3.6 (Helios): http://dl.google.com/eclipse/plugin/3.6 Eclipse 3.5 (Galileo): http://dl.google.com/eclipse/plugin/3.5 Eclipse 3.4 (Ganymede): http://dl.google.com/eclipse/plugin/3.4 Eclipse 3.3 (Europa): http://dl.google.com/eclipse/plugin/3.3 Click OK In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded. Click Next . Read and accept the license agreements, then click Finish . No...

Error: Unable to open class file R.java and How to fix it.

[2011-05-27 12:12:39 - listActivity] ERROR: Unable to open class file /root/workspace/Manifest.java: No such file or directory [2011-05-27 13:50:38 - listActivity] ERROR: Unable to open class file /root/workspace//R.java: No such file or directory R.java and Manifest.java is a automatically generated file. The ADT has a few such annoying bugs. But you can sort them out.. What usually helps is: 1. Close Project->Open Project > Build Automatically . 2.Another thing that sometimes helps is right click project > android tools > fix project properties and remove unnecessary content or jar files. 3.Or you can do Project->clean and Refresh . If still it not generating R.java files then check your class there must be a extra line.. Import R.java.*; Remove that and then do all the above one by one.. Hope it help .. If someone know other way please let me know. T...

Conversion to Dalvik format failed with error 1

Sometime You will encounter this problem when trying to Build Android Project on Eclipse..  You will get such output in console: [2011-05-24 09:25:03 - Android C2DM] Dx 1 error; aborting [2011-05-24 09:25:03 - Android C2DM] Conversion to Dalvik format failed with error 1 You can solve this problem: Go to Project » Properties » Java Build Path » Libraries and remove all except the "Android X.Y" (in my case Android 2.2). click OK.  and then Go to Project » Clean » Clean projects selected below » select your project and click OK.   That work for me. Hope it works for you too.!!!!