I happened to create a new Java Desktop Application project in the Netbeans 6.9 IDE. And t his is the Disclaimer which followed: Note that JSR-296 (Swing Application Framework) is no longer […]
We, Java Programmers, are tired of writing- Getters, Setters, Constructors, and other boilerplate code or tired of reading this boilerplate code. Often the important logic in the class gets hidden due to […]
There was one query which came up on Javaranch– it was related to difference between using synchronized block with a method local variable and current instance “this”. I thought that this would […]
Executing external command from within JVM often causes problems- be it in terms of the code to write and manage or in the ease of implementation. I had similar requirement in my Major project for my Under Graduate Degree, where in I had to launch a C program from the Java code. I ran into different issues like- the Main thread getting blocked, the GUI freezing, or reading the output streams and so on. Finally I had to give up the idea and stick with launching the external command externally 😛 Had I found the Exec library from Apache Commons then, my work would have been lot easier. Anyways better late then never. I will quickly go through how one can use Exec library to launch external programs from JVM- Its a wrapper over Java’s ProcessBuilder, Runtime.getRuntime().exe().
We can use JAXB to marshal the Java objects into XML using the given Schema and vice versa- unmarshal XML into Java objects. The xml schema can be specified in DTD, XSD […]
Before going into the details I will state the requirement: I need to fetch certain records from 3 different tables into 3 ArrayLists. I have 3 Classes which store the information: Lets […]
I cleared SCJP 6.0 with 81% on January 25, 2010 (putting this up after a long gap), not a really good score, but happy to get a “PASS” :). I did manage […]
In this post I would like to explain about Enums in Java. Though in my 2 years of coding in Java I have seldom used Enums but they do provide a lot […]
I executed a simple GUI application which would load the CSV file and parse it and show the contents in a JTable. When the applications started- There was a JFrame, 2 JPanels, a JLabel and a JButton with an Icon. I wanted to monitor the Heap size variations, the number of Classes, Threads details and also wanted to profile the application. So i thought of using VisualVM. The following are the results and snapshots of profiling using VisualVM. Note that the application had only one public class MainFrame in gui package. Also note that i was using the Nimbus Look and Feel.
I know lot of you starting out new as Linux users or Java learners on Linux platform find it an issue to install JDK or may be configure it to start using […]