I picked up Learning Java to dive into Java. I found this tome to be pretty comprehensive, covering the breadth and depth of Java. My full review of this book can be seen here.
Tag Archives: java
Eclipse: Silent Startup Error
Yesterday Eclipse started to show a strange problem. Invoking eclipse.exe would display the splash screen and would exit after that!
Since the program would not even display an error message, I first tried invoking it from the console to see any errors. It would exit without writing anything on the console. I then thought it might be a corruption of settings or workspace, but cleaning those did not help either. I then looked at the runtime options I could pass to eclipse.exe and tried those options related to a clean invocation and logging. Nothing helped.
I had almost given up when I noticed the eclipsec.exe in the same directory. This turned out to be a console executable of Eclipse. Invoking this finally showed the problem:
C:\Program Files\Eclipse>eclipsec.exe Error occured during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
So, there was a problem with the JVM! I downloaded and installed the latest JRE and Eclipse worked fine after that!
Java: Limits of Primitive Types
The maximum and minimum values of primitive number types in Java (Byte, Short, Integer, Long, Float, Double) can be obtained by reading the MAX_VALUE and MIN_VALUE of their classes.
For example:
int maxInt = Integer.MAX_VALUE; float minFloat = Float.MIN_VALUE;
Ubuntu: Javadoc
The Javadoc tool is used to generate documentation from comments in Java source code. To generate documentation in Eclipse, choose Project → Generate Javadoc. You may be required to provide the path to the javadoc binary in the Javadoc command field. This is typically /usr/bin/javadoc.
On a typical installation of Eclipse in Ubuntu 9.10 (Karmic Koala), you may not find the javadoc binary. To get this binary, install the openjdk-6-jdk package.
Eclipse: Add Java

I use the Eclipse IDE for C/C++, primarily for working with Python using the PyDev package. I recently had to try some Java code. Here is how to update Eclipse IDE for C/C++ to build Java:
- Make sure all the existing components of Eclipse are updated. To do this choose Help → Check for Updates.
- To install Java, choose Help → Install New Software. From the Work with dropdown, choose EPP Packages Repository. Expand the Uncategorized section below and choose EPP Java Package. Click Next and navigate through the install wizard to the finish.
