Writing by shivdev on Tuesday, 16 of November , 2010 at 1:19 pm
This is such a common task, yet needs a bit of thinking.
List <string> strList = getListOfString();
String[] strArr = strList.toArray(new String[strList.size()]);
Category: Java
Writing by shivdev on Friday, 12 of November , 2010 at 12:57 pm
One simple solution is to convert both strings to lower case and then use the contains() method.
public boolean containsIgnoreCase(String longString, String shortString) {
return (longString.toLowerCase().contains(shortString.toLowerCase()));
}
Category: Java
Writing by shivdev on Tuesday, 21 of September , 2010 at 11:31 pm
I’ve been listening to the Java Posse podcast for several years now, and today I finally got to meet them in person. Very nice guys! This picture was taken just before the live Java Posse #323 – Newscast for Sept 17th 2010 at Java One 2010 outside the Hilton.

In this photo – Dick Wall, Joe Nuxoll, Tor Norbye and Carl Quinn.
Category: Java
Writing by shivdev 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
Category: Eclipse,Java
Writing by shivdev 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.
Category: Eclipse,Java,Top 10
Writing by shivdev on Tuesday, 15 of June , 2010 at 1:16 pm
JAD has been around for a long time but is no longer maintained. I’m not sure about the “legality” of it’s use etc. but if you’re doing “legit” decompilation then it can be extremely useful.
At the time of writing this, JAD could be downloaded from Tomas Varaneckas site for Windows, Linux, Solaris and a plethora of other Operating Systems.
Once downloaded, you can easily integrate it with eclipse using JadClipse.
Category: Java