When you're working with a Java project in Eclipse and you need to add a new jar file to your project, you don't need to close down Eclipse or your current Eclipse project (as I've seen a few people do). In fact, here are all the steps you need to take to add a new jar file to your Eclipse build path:
recent posts related to the eclipse ide
When using Eclipse straight out of the box, if you click on a Java-provided class, like the
FileWriter class, you won't get much help when the Eclipse Class File Editor is shown. All you'll see is some binary information, with these messages at the top of the file:
Source not found The jar file classes.jar has no source attachment. You can attach the source by clicking the Attach Source below:
(The message really should end with "by clicking the Attach Source button below:")
A nice feature of Eclipse is that you can easily generate
equals methods for your Java class using the editor. You'll really appreciate this capability when you need to create these methods whenever you're doing anything related to sorting, comparisons, comparators, etc.
I just learned that Eclipse can automatically create (or suggest) variable names for you. The suggestions are based on the class of the object you're about to create, and any characters you've typed for the variable name so far.
For example, if I'm in a method and I type
Connection, followed by a space, then press the [Control][Space] keys, Eclipse adds a variable named
connection, so my line changes to
Using Eclipse, if your cursor is positioned in between the parentheses of a method call, the [Control][Spacebar] keystroke will show you the signature of the method, i.e., the parameters that the method accepts. I just read where the documentation shows that you should use the [Control][Shift][Spacebar] keystroke to see method parameters, but I've found that [Control][Spacebar] works fine for me.
I've just recently started using Eclipse a lot, and I just typed
System.err.println() one more time than I cared to. I just looked it up, and Eclipse also has templates, and one of the pre-built templates lets me type
sys, then hit the [Ctrl][Spacebar] keystroke. This brings up a list of options I can choose from, one of those options being to insert the
System.err.println() text in place of my