Java Tutorials, Tips & Tricks

Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems’ Java. It is platform independent.

PDF Generation in Java using iText JAR

PDF Generation in Java using iText JAR
Generating PDF files in today's enterprise applications is quite common. Doing this with Java is not an easy task as Java does not gives default api's to handle PDF files. No worries, iText jar is for you.iText is a free Java-PDF library that allows you to generate PDF files on the fly (dynamically). iText is an ...

Performance Monitoring using Glassbox

Performance Monitoring using Glassbox
Industry is recognizing the fact that Performance testing & engineering should be part of the project execution road map starting from Requirement gathering phase. At many times during project executions, performance engineering related activities are executed based on customer need or slow response time of application after development phase gets completed. Glassbox can be leveraged (by developers/testers/business users) ...

Creating & Parsing JSON data with Java Servlet/Struts/JSP

Creating & Parsing JSON data with Java Servlet/Struts/JSP
JSON (JavaScript Object Notation) is a lightweight computer data interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects). The JSON format is specified in RFC 4627 by Douglas Crockford. The official Internet media type for JSON is application/json.The JSON format is often used for transmitting structured data over a network connection in ...

Convert Jar file to EXE executable.

Convert Jar file to EXE executable.
I remember the day when I created a Tic Tac Toe game using Java Swing and packed it in an executable JAR file to distribute it among my friends. As few of my friends were not from computer background, they were unable to execute the JAR file. Hence I converted the JAR into EXE and send them the EXE.It is sometime desirable to ...

How to take screen shots in Java

How to take screen shots in Java
While surfing through internet, I came to this amazing piece of code in Java that takes the screen shot of your desktop and save it in a PNG file.This example uses java.awt.Robot class to capture the screen pixels and returns a BufferedImage. Java.awt.Robot class is used to take the control ...

Decompile Java Class file using decompilers.

Decompile Java Class file using decompilers.
Byte codes generated by javac compiler can again be converted into java source. For this we need a decompiler tool. Decompilers are the utilities that generate the source code from input java class file.A Decompiler knows about the structure of a Java class and parse it to generated Java source code.Java decompilers will not ...

Java Singleton design pattern tutorial.

Java Singleton design pattern tutorial.
Java Singleton design pattern is one of the design pattern that governs the instantiation of an object in Java. This design pattern suggest that only one instance of a Singleton object is created by the JVM. This pattern is useful when exactly one object is needed to coordinate actions across the system. Also it can be generalized to restrict the objects to certain number of ...

Playing with JVM / Java Heap Size.

Playing with JVM / Java Heap Size.
Java programs executes in JVM uses Heap of memory to manage the data. If your Java program requires a large amount of memory, it is possible that the virtual machine will begin to throw OutOfMemoryError instances when attempting to instantiate an object. The default heap size if 1 MB and can increase as much as 16 ...

Tutorial: Java Class file format, revealed…

Tutorial: Java Class file format, revealed...
In previous tutorial Java Virtual Machine, An inside story..., we saw some basic of internals of JVM and how it is divided into different components that helps in execution of Java byte code. Java Byte code as we saw is packed in a file called class file (with .class extension). In this tutorial let us see the internals of a class file. How the ...

Java Virtual Machine, An inside story!!

Java Virtual Machine, An inside story!!
Java Virtual Machine, or JVM as its name suggest is a "virtual" computer that resides in the "real" computer as a software process. JVM gives Java the flexibility of platform independence. Let us see first how exactly Java program is created, compiled and executed.Java code is written in .java file. This code contains one or more Java language attributes like Classes, Methods, Variable, Objects etc. ...
Page 7 of 8« First...45678