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 […]
This refcard gives you an overview of key aspects of the Java language and cheat sheets on the core library (formatted output, collections, regular expressions, logging, properties) as well as the most […]
Hi readers, I have created this poll to get an idea of the popularity of various IDEs for Java Application developments all over the world. Do vote for your favorite IDE and […]
General: JavaFX Homepage: http://javafx.com/ OpenJFX’s Homepage: https://openjfx.dev.java.net/ The JavaFX Community: http://jfx.wikia.com/wiki/The_JavaFX_Community Useful Links from PlanetJFX: http://jfx.wikia.com/wiki/Tutorials Downloads for JavaFX: http://java.sun.com/javafx/downloads/ JavaFX Script Language Support for NetBeans IDE: http://javafx.netbeans.org/ JavaFX Technology Screencasts: http://java.sun.com/javafx/screencasts/index.jsp […]