How To Update Clipboard Content In Java

java-thumbnail

If you are working on the tools development or similar product developments , then system level programming or OS interaction operations are necessary to access the native data. One of the most frequently used operation is the clipboard data. In particular, if you write program to develop own editors like notepad, clipboard operation is very […]

How To Display Currency For A Locale In Java

java-thumbnail

This example demonstrates how to get currency name for the given locale. This would be very useful for the programmers when you want to display the amount prefixed with the currency symbol dynamically for different countries. You can get the currency object for a given locale by calling Currency.getInstance(locale) method. This returns the currency object which […]

Servlet API

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions The Servlet API is supported by all Servlet containers, such as Tomcat and Weblogic, etc. The Application Programming Interface (API) contains interface and classes to write a servlet program. The servlet API contains two packages as listed below: javax.servlet javax.servlet.http Package javax.servlet javax.servlet contains a number of […]

Introduction to Servlet

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions What is Servlet ? Servlets are an important component of a J2EE application. Servlets along with JavaServer Pages (JSP) and EJB modules can be termed as server-side J2EE component types. Servlet is a Java Programming Language. Servlets are used to create web applications. Servlets are used to […]

How To Run External Application From Java

java-thumbnail

If you are working on system programming in Java, it is very common to run the processes for starting some external applications. Runtime class defines a method to execute the external applications. This example shows how to open another eclipse instance from the Java program. This example opens the eclipse IDE, and the closes the […]

How To Write Properties To XML File In Java

java-thumbnail

In my previous tutorial I have written a sample program to write properties to a properties file. This example is writing the properties object values to a XML file. Here we are using the storeToXML method instead of just store method. This method will create the XML file with the content in the properties object. Lets look at […]

How To Write Properties File In Java

java-thumbnail

Properties files are stored values in the key-value pairs. This tutorial explains how you can create the properties file using the Java program. If you are aware, Java itself has a Properties class which is used for string the values in the key-value pairs. If you have the values in the Properties object, then those […]

How To Get Java System Properties Values

java-thumbnail

Java’s System class maintains a property object which contains the various details of the current user, Java version, operating system, etc. These are predefined values and can be easily accessed by calling the System class level methods. This utility is very useful to get the native operating system details. Lets look at the below example […]

How To Get Screen Resolution In Java

java-thumbnail

This post highlights the one of the feature of Toolkit class in Java. If you are working on web application or desktop development, the common standard is to render the screen for the user’s current resolution. Each user may have the different resolutions and screen sizes. It is very simple to get the current screen size […]

How To Get IP Address In Java

java-thumbnail

This is simple example to demonstrate the use of InetAddress.getLocalHost() API to retrieve the IP Address details of your local system or where ever the Java program is executed. If you write a server applications, this can be used for getting the server’s IP Address. Lets look at the example code to display the IP Address […]