Archive

Posts Tagged ‘eclipse’

How to create a java project with Maven in Eclipse

April 28th, 2014 No comments

There are two way to get started with java project in Maven

1. Use command line tool

2. Use Eclipse or STS.

In this port we will demonstrate how to create a maven project in Eclipse or STS (Spring source tool Suite)

 

Using Eclipse/ STS to create Java Maven Project

  • Click on File –>New Project .
  • Select the Maven project.
  • In next step, give the name and then go to next step of selecting the archetype. This is important. If you skip the archetype selection, you will no longer be able to run java code.

Arhchetype are maven project templating toolkit. Fastest and easiest way to get started. For more on Archetype refer to maven Arhchetype

maven-java-project

  • Select maven-archetype-quickstart. Eclipse will try to download if not already present.
  • Fill in the details and click finish
  • You would be able to see  the project in your Eclipse.
  • To verify , this is how the Java Build path should look like in Eclipse
  • Maven java project

Eclipse Short Cut Keys- The most useful ones

May 31st, 2011 1 comment

I am summarizing the most useful Eclipse shortcut keys which are really helpful in day to day work

Ctrl + Space : Content Assist

syso + Ctrl + space = writes out System.out.Println for you (I love this one)

Ctrl + Shift + T : Open resource box to look for a Java file

Ctrl + Shift + R: Open resource box to look for a non Java file

Ctrl + F8 : Switch between perspective

Ctrl + F11 : Run the last launched

F11 : Run the last launched in debug mode

Ctrl + Page Up / Ctrl + Page Down : Move between open classes

Alt +Shift +J : Add block comments to a clas sor method

Ctrl + Shift + / : Comment the selected code Read more…

Eclipse Shortcut Keys – How to add comment on implementing classes

March 18th, 2011 2 comments

If you are looking to add comments to your implementing classes in Eclipse, here is the cool technique

Let us say you have class UserDAO and has method getUser()

public interface UserDAO{

public User getUser();

}

To add a comment over the method select getUser or take the cursor before getUser and press ALT + SHIFT + J It will add the comment on top of your method

/*

* @param
* @return User
*/

public User getUser();

Now suppose you want to add non java doc comment in implementing class

public ClassUserDAO{

public User getUser(){

}

}

To add a comment over the method select getUser or take the cursor before getUser and press ALT + SHIFT + J . It will add the non java doc comment on top of your method

/* (non-Javadoc)
* @see com.skg.dao.UsertDAO#getUser()
*/

public User getUser(){

}

How to add SVN plugin for STS ?

October 28th, 2010 4 comments

Spring source comes with default plugin for CVS. They had SVN plugin but it was removed in release 2.3.1 for following reason

We removed the Collabnet SVN from the Extension install for non-Windows platforms as we were seeing lots of issues with the SVN Java native bindings on Linux and Mac.
So if you want to install SVN support please manually install Subclipse or Subversive from their respective update sites.
Currently we can’t provide a solution that works on all platforms due to licensing restrictions on SVNKit. The good news is that we are currently going through the legal process to obtain a SVNKit redistribution license for STS. Once this agreement is in place we can add Subclipse and/or Subversive to the Extension install

Here is how to add the SVN plugin ig you need it

1. Open the STS dashboard.

2. Go to Extensions. This is under help and documentation.

3. Look for Subeclipse. Check the checkbox and click Install.

If you do not see Subeclipse it implies that it is already installed on your IDE.

Eclipse shortcut keys

October 12th, 2010 1 comment

Have difficulty in remembering shortcut for eclipse keys ?

Here is a nice wallpaper to remind you of shortcuts.

Eclipse shortcuts

Eclipse shortcuts

Eclipse shortcuts
Categories: Programming / tutorials Tags: ,

Good bye MyEclipse. Welcome STS -Spring source Tool Suite

January 22nd, 2010 8 comments

I had been using myEclipse for couple of years and was happy with features and convenience they provided especially the hot deploy feature. The license fees is $30 per year which wasn’t bad.

Recently I downloaded MyEclipse7 which had some new features and like advanced java script tooling, JSF views and enhancements.  It was a huge file and after installation when you start myeclipse, it takes a good amount of time to fire up.

I have a machine which is pretty good with 2GB of RAM and this was not the kind of sluggish performance which I expected. I am assuming the high boot up time is that they have introduced many new features and capabilities, UML upgrades . Now even if you are not using them , it takes time to load them up all the libraries. Perhaps they should have allowed the users to customize the options based on need instead of pushing everything in their face. Read more…