Creating JavaDoc for a one-off Java class

Writing by on Tuesday, 15 of February , 2011 at 9:48 pm

Sometimes you might want to create some JavaDoc for some APIs (as a one-off) say for a customer (Doc Team etc.). Simply use the javadoc command line option. Use the -d option to specify the destination for generated HTML content.

~/java/jdk1.6.0_20/bin/javadoc ./src/java/com/domain/api/ -d ~/tmp/javadoc

Alternatively, from within Eclipse – you can start the JavaDoc wizard and select the class you want generate the JavaDoc for.

File => Export => Java => JavaDoc => Select The Class, Desitination and hit Finish

Leave a comment

Category: Eclipse,Java

Java Remote Debug

Writing by on Thursday, 12 of August , 2010 at 4:45 pm

It’s easy to forget the options required to start a Java process with Remote Debug turned on at some port. So, to attach your Eclipse (or other IDE) debugger to a running Java process you need to start that process with the following Java options.

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5096

Start your Java process with these parameters. Then you can use your IDE to connect to this process.

For Eclipse,

  • In Eclipse, navigate to Run | Debug Configurations…
  • Create a new Remote Java Application (in the left column)
  • Fill in the required values and in the port enter 5096 and click Debug to attach to the process

Leave a comment

Category: Eclipse,Java

Eclipse open files in the Text Editor

Writing by on Tuesday, 10 of August , 2010 at 1:20 pm

Sometimes Eclipse opens *.sh (etc.) files in the default editor emacs, vi etc. or probably tries to execute them. To open them in the Default Eclipse Text Editor you need to set it up in the Eclipse preferences.

Window->Preferences->General->Editors->File Association
In the File types: section Add *.sh
In the Associated editor section Add Text Editor

Leave a comment

Category: Eclipse

Split an editor in Eclipse

Writing by on Wednesday, 4 of August , 2010 at 1:06 pm

Yes, sometimes it’s a lot easier to Google for these things instead of spending time inside of Eclipse :)

Window ==> New Editor

…will bring up a new editor for the current file. You can position this in Eclipse wherever you like to see multiple portions of the same file.

Leave a comment

Category: Eclipse

Top 5 Eclipse Plugins

Writing by on Saturday, 19 of June , 2010 at 11:15 am

Eclipse Marketplace has a variety of eclipse tools and plugins but the following is a list of very useful Eclipse plugins that I must have.

  • Perforce Plugin is a must have for developers using Perforce as their revision control system. Once setup, it provides seamless integration with P4.
  • SQL Explorer Plugin is a nifty little SQL client that allows you to query and browse any JDBC compliant databases. It supports Oracle, DB2 and MySQL and could be extended to include support for other databases.
  • JadClipse Plugin is a must have for seamless integration with JAD (Java Decompiler)
  • FindBugs plugin is used to perform static analysis to look for bugs in Java code.
  • Regex Util (Tester) plugin is used to test Regular Expressions.

The following is a list of plugins you might need depending on the nature of your work etc.

  • Google for GWT development
  • BIRT is an Eclipse Based Reporting Framework.
  • Tomcat allows integration with Tomcat.
  • ADT Android Development Tools is an excellent plugin required for Android Development.
  • Ivy if your application uses Ivy for modular dependency.

Leave a comment

Category: Eclipse,Java,Top 10

Shivdev Kalambi's Blog

Shivdev Kalambi is a Software Development Manager, previously a Principal Software Engineer at ArcSight/HP. With over 16 years' experience in software development, he's worked on several technologies and played different roles and contributed to all phases of projects. Non-tech activies include Ping-pong, Rock Climbing and Yoga at PG, Golf, Skiing, Swimming & a beer enthusiast.