Java Process Example

Exceptions in Java (Both are objects!) Events objects contain: 1. I especially appreciate the example code to show callbacks vs ExecutorCompletionService – I had assumed I must be missing something since callbacks are obviously part of a fully asynchronous request/response, but are not discussed in java. This process starts from the applicants and ends at the emplacement breeding center. The Java code snippet embed below furnishes the following features. This means that you can not allocate an array with more than Integer. We can use in switch case to set our java bean properties. You are here: Home » Java » Monthly Payment Calculator Java 2. Using the Command-Line Utility To perform a transformation, you can call Xalan-Java from the command line (or script), an applet, an application, or a servlet (see Usage Patterns ). Turning your processor into a full Component. Command-Line Arguments. The Java Virtual Machine is responsible for interpreting Java byte code and translating this into actions or Operating System calls. There are four basic concrete server classes: class SocketServer. How to Execute tcpdump Linux Command using Java Process Class and Capture TCP/IP Packets Last Updated on February 25th, 2019 by App Shah Leave a comment Let's take a look at a problem in which you may want to capture Tcpdump output in your Java Program. We can create fully encapsulated class by making the entire data member will be private and create getter, setter method to access that data member. bat is similar, but will not display a console. Example 1: Flowchart to Find the Sum of First 50 Natural Numbers. Mo re Examples of Process Flowchart. Which object (widget, normally) is the source of the event 3. Edit this example. The example code above declares the main method properly. Finally, learn which garbage collectors are available in the Java SE 7 Hotspot JVM. Process the command line with CLI in Java, common CLI example CLI (=Command Line Interface) How many times have you written a Java application and had had to rewrite a new way of specifying the input parameters to your application?. , database rows, XML elements, lines in a flat file—whatever), process them, and write them out somewhere to make it convenient for subsequent steps to work with the result. This Tech Tip reprinted with permission by java. The start() method creates a new Process instance with those attributes. Then, join our Getting Started group, Introduce yourself to community, and start exploring! Want to offer feedback, or share your ideas? We'd love to hear from you!. [code] ProcessBuilder pb = new ProcessBuilder("standalone. Maven exec plugin lets you run the main method of a Java class in your project, with the project dependencies automatically included in the classpath. Implementation of the Work interface requires you to define a run() method and implement business logic for performing tasks/work in this method. Example 2: Eureka, How to Get Stop-Process Working. The Apache Tomcat software is developed in an open and participatory environment and released under the Apache License version 2. In other words, I did a double mapping. Fast Inter-Process Communication over Shared Memory for Java Big Data Applications. jsp" Display "Hello World" in the chosen color using a servlet - in our example it will be "helloWorld. I've presented here a simple example to illustrate how to convert stand-alone java programs (mostly, JARs) to WARs which can then be deployed in full-blown application servers (JBoss, WebSphere, etc. You can find ProcessBuilder in the java. Primarily used for transformation or extraction, it features filters, visitors, custom tags and easy to use JavaBeans. The input-process-output (IPO) model is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or another process. Supervisor: A Process Control System¶ Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. By Chaitanya Singh | Filed Under: Java Examples To understand a programming language you must practice the programs, this way you can learn the language faster. The next interaction example uses the stdin and stdout file handles owned by the Popen instance in different ways. As an example, let’s imagine we’re creating a database of the children in a class, and the pets they have. Pass Student. Java Generics and Collections: Speed Up the Java Development Process [Maurice Naftalin, Philip Wadler] on Amazon. How to run external programs by using Java ProcessBuilder class? The class java. Creating a Process. xml file is the project's Project Object Model, or POM. Java SE 8 to the rescue! The Java API designers are updating the API with a new abstraction called Stream that lets you process data in a declarative way. In this Java thread tutorial I will explain how to create and start threads. But the process should remain same for most of the other IDEs. For example if I want to know the average of two grades, We can write "average = (grade_1 + grade_2) / 2. Feel free to modify the code and play with it. Note 2: It's all down to the (|) pipe. A server application written in Java might have to perform several tasks before being able to shutdown the Virtual Machine process. For example, the audit trails of a workflow management system or the transaction logs of an enterprise resource planning system can be used to discover models describing processes, organizations, and products. (It is also sometimes called a "Signal and Continue" monitor. Introduction. A Student can have one or more Subject. If you want to send email by using your SMTP server provided by the host provider, see the example after this one. Process object. EXAMPLES; EXERCISES; VIDEOS; DOWNLOADS; RESOURCES; GET THE BOOK; BUY ON AMAZON EXAMPLES. *FREE* shipping on qualifying offers. Verify that the Java process is still running with the ps aux command (R or S state in STAT column). BorderLayout; Related examples in the same category. When starting to build this database, the first approach might be to create a simple table with all of the information in one place, and one row for each student. Rational Unified Process (RUP) is an object-oriented and Web-enabled program development methodology. Information. A thread, in the context of Java, is the path followed when executing a program. They provide a workflow and Business Process Management (BPM) platform for developers, system admins and business users. This doesn’t mean that the longest chunk of memory you can allocate in Java is 2 Gb. If you want to send email by using your SMTP server provided by the host provider, see the example after this one. A thread is an independent path of execution within a program. FastCGI Example¶. It contains over 1000 pages of detailed information on SAX, DOM, JDOM, JAXP, TrAX, XPath, XSLT, SOAP, and lots of other juicy acronyms. Download and read online Core Java Interview Questions And Answers For Experienced With Examples PDF Book file easily for everyone or every device. Freemarker is an open source powerful template language. In this post we will discuss the differences between thread and process. Class constructors. start() and Runtime. ActionEvent) 2. Garbage collection is a process by which Java achieves better memory management. The above process is not a one-time process. So you just need to create a Component class by deriving from DefaultComponent which returns instances of ProcessorEndpoint. Iterate through List Java Example shows how to iterate over a List using various approaches like using for loop, enhanced for loop, Iterator, ListIterator, while loop and using Java 8 forEach. sed is a stream editor. ProcessBuilder manages the below attributes. Now we have Student object and can process it. Introduction. Create some Java source code with Notepad from within the command window. Process: getOutputStream() import java. I lead the JCP Program Management Office (PMO) at Oracle, and am responsible for the day-to-day nurturing, support, and growth of the community, including the JCP. What is Encapsulation in Java? Encapsulation is process of wrapping code and data together into a single unit. It's a typical learning-by-doing project. The code size is very small and give you a good idea about how a UDP Server opens up a port, and then the UDP Client sends or […]. The process of calling C or C ++ from Java programs consists of six steps. The workflow definition is the type (or template) of a workflow process. For example, the HelloWorld class should be in the HelloWorld. Brainstorming is useful in creating flowcharts as individuals do not have knowledge of the entire process. A Java program can have many threads, and these threads can run concurrently, either asynchronously or synchronously. For example,. NET, JavaScript, and C++. In the subsequent post I will use the below utility method to print the process information. How to Execute tcpdump Linux Command using Java Process Class and Capture TCP/IP Packets Last Updated on February 25th, 2019 by App Shah Leave a comment Let's take a look at a problem in which you may want to capture Tcpdump output in your Java Program. Example Domain. These examples are running online through p5. some taking up to a half hour to run. 2 DEFINING THREADS To understand multithreading, the concepts process and thread must be understood. How to Execute tcpdump Linux Command using Java Process Class and Capture TCP/IP Packets Last Updated on February 25th, 2019 by App Shah Leave a comment Let's take a look at a problem in which you may want to capture Tcpdump output in your Java Program. ProcessBuilder manages the below attributes. Example 2: Get-Process - Check Companies One aspect of scripting is to automate routine tasks, another aspect is to persuade PowerShell to do stuff that you can cannot do in the corresponding GUI, in this instance, to list Processes grouped by company. Below is a java code demonstrates the use of command(List command) method of ProcessBuilder class. The synchronization lock is kept in the Object. Code the Craft, Craft the Code. Once you have learned how the garbage collector functions, learn how to monitor the garbage collection process using Visual VM. The Promise interface in jQuery 1. Eight years ago in 2002, I created the iBATIS Data Mapper and introduced SQL Mapping as an approach to persistence layer development. TCPServer (server_address, RequestHandlerClass, bind_and_activate=True) ¶ This uses the Internet TCP protocol, which provides for continuous streams of data between the client and server. Follow each step to build an app from scratch, or skip to the end get the source for this article. Then you can just call ~/killjava from a terminal and your Java process will be stone dead. Abstraction in java is achieved by using interface and abstract class. ProcessBuilder has been introduced in JDK 5. In this article, he explains how to leverage multicore computing to speed up the processing of I/O-based data using the Java Streams API and a fixed-batch spliterator. Here is a simple Java program that reads a text file line by line and display each line on the console using System. An array is a container that holds data (values) of one single type. One simple scenario is when one thread executes some code synchronized on object1 and needs to execute code synchronized on object2 still holding the object1 lock. We break the process of programming in Java into three steps: Create the program by typing it into a text editor and saving it to a file named, say, MyProgram. If you want to send email by using your SMTP server provided by the host provider, see the example after this one. The synchronization lock is kept in the Object. Environment: System. Info, this instance can be used to get the following details: Executable pathname for the process. This example works for modeling any process that has inertia. getInputStream lets you read in the data that your process squirted out to stdout. com is created, written by, and maintained by Yong Mook Kim, aka Mkyong. Generally we get that done using the versatile System class like System. net) is dedicated to provide you free high-quality java tutorials with a lot of java examples you can use for learning or completing your tasks as java developer. Java 9: Process API and Version String Formats Here we take a look at a couple of less popular, but still important changes coming with Java 9 — version string formatting and the Process API. Process of building and running java application programs Difference Between applet and application Application Application can be directly executed by a Java. The next example, launch CMD. For this SOAP web services example in Java using Eclipse, we will employ WildFly 10. Java JSON Parser Example. Garbage collection is a process by which Java achieves better memory management. Java processes are one of the mechanisms Openbravo provides to implement business logic. Just construct a ProcessBuilder object, tell it to start, and assign the results to a Process object, and you're done. Java Process Example 1. One of the reasons why Kotlin is preferred over Java is that you don't need to write never-ending code with Kotlin. Postcast server, Apache James server, Cmail server etc. Integer object and an int array for a 64-bit Java process View image at full size Figure 5 shows that for a 64-bit Integer object, 224 bits of data are now being used to store the 32 bits used for the int field — an overhead ratio of 7:1. " Step 1: Put this source code into a file named "SimpleBean. Data specific to the event type (e. Through the given example you can understand how the progress bar is created for showing your. A Workflow Precess Step implementation in Java is a Class which implements the Interface JavaProcessExt (or JavaProcess if no external attributes are used). Brainstorming is useful in creating flowcharts as individuals do not have knowledge of the entire process. FileReader; import java. The addition of the Stream is one of the major new functionality in Java 8. Embed a Chromium-based Swing/JavaFX component into your Java application to display modern web pages built with HTML5, CSS3, JavaScript, Flash, Silverlight etc. Java is not considered an easy-to-use language for non-programmers. Integer object and an int array for a 64-bit Java process View image at full size Figure 5 shows that for a 64-bit Integer object, 224 bits of data are now being used to store the 32 bits used for the int field — an overhead ratio of 7:1. *FREE* shipping on qualifying offers. Introduction In part one of this series, we saw three approaches to fully automate the provisioning of certificates and create end-to-end encryption. It lets you solve Java problems from our Building Java Programs textbook. On windows platform, how to use java code to kill a process?? For example, I start a process called flashfxp. It will not return end-of-file if there happens at present to be no more output from the process. Process public abstract class Process extends Object The ProcessBuilder. Once you have learned how the garbage collector functions, learn how to monitor the garbage collection process using Visual VM. The Work Manager API defines Work as a unit of work, which you want to execute asynchronously. jar -cvf sampleJavaMappingCode. Class Every Java program is implemented by a class. For example, you can create an array that can hold 100 values of int type. Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. For example if I want to know the average of two grades, We can write "average = (grade_1 + grade_2) / 2. The first thing you may notice is the purple box on the right side of the graph sitting directly above the number line. sed is a stream editor. We can define a process in it using the BPMN 2. A Java program can have many threads, and these threads can run concurrently, either asynchronously or synchronously. Check if the bug is a duplicate. We are using ThreadMXBean management interface for the thread system of the Java virtual machine (JVM). This code snippet can also be used to run any executable program apart from the batch file. Methods provided by the Process is used to perform input, output, waiting for the process o complete, checking exit status of the process and destroying process. A thread is an independent path of execution within a program. tcl" and type "ns ns-simple. close the stream. INSTANCE VARIABLES. iBATIS Project Team Moving to Google Code. In this article, we’d like to address automatic memory management for Java. real life example of polymorphism is behavior of person at different places. We break the process of programming in Java into three steps: Create the program by typing it into a text editor and saving it to a file named, say, MyProgram. Tasks such as compileJava and test then use one or more of those configurations to get the corresponding files and use them, for example by placing them on a compilation or runtime classpath. And, often, we question ourselves on how to decrease the spends, without affecting the performance of your apps at the same time. After it is opened, the program would wait for, say, 10 seconds and then destroy the process, which will immediately close the application. Why am I getting RC=10 and STAFResult=8 when starting a Java process in a STAX job? Certain Unix Java versions will contain a /bin/java file that is actually a soft link to a wrapper shell script file, rather than a binary executable file. For example, the audit trails of a workflow management system or the transaction logs of an enterprise resource planning system can be used to discover models describing processes, organizations, and products. An Overview of Batch Processing in Java EE 7. When enabled — debug = true — the process is started in a suspended state, listening on port 5005. They provide a workflow and Business Process Management (BPM) platform for developers, system admins and business users. Tutorial – Calling Java from a Bash Script February 12, 2014 3 min read Bash is a very flexible cross-platform scripting language with multiple uses and can integrate with lots of other tools (ie DIff). js using HTML Canvas for rendering. Browse medical process flowchart templates and examples you can make with SmartDraw. However, writing complex programs Example: Using a thread for timing and a. The script is given access to the task’s stdout and stderr outputs, syslog and jobconf. They stand for very typical usage. The above process is not a one-time process. A thread, in the context of Java, is the path followed when executing a program. Java Input and Output (I/O) Console Input. This section shows a simple NS simulation script and explains what each line does. DWR - DWR is a Java open source library which allows you to write Ajax web sites. The project was created to merge similar functionality of projects at ZeroTurnaround into a single codebase. The next example, launch CMD. Many threads can run concurrently within a program. Input operations are framed in terms of reading from a stream in a three-step process: open the stream, read data items from the stream front to back in sequence, and. The Java plugin adds a number of dependency configurations to your project, as shown below. The POM The pom. These are at the level of the operating system. As an example, let’s imagine we’re creating a database of the children in a class, and the pets they have. By understanding them, you will have a better understanding about notify() and wait(). Download code samples and examples for Windows 8, Microsoft Azure, Office, SharePoint, Silverlight and other products in C#, VB. This class is used to launch external program which means that you can call external script, program outside of the java program in order to accomplish desired task. Programming in Java. If you want to capture the output of one process from another, we use Runtime. An example Java class for building a simple GUI application. getOutputStream lets you write out data that will be used as input to the process. Searching for methods from those packages in the code base can yield results. so as this process gets written to it spawns child processes, and some of those child processes are large. Progress Bar in Java Swing In this section, you can learn how to handle progress bar in java swing. Command: List of commands to be handled. Class Every Java program is implemented by a class. Eclipse Process Framework Project (EPF) The Eclipse Process Framework (EPF) aims at producing a customizable software process enginering framework, with exemplary process content and tools, supporting a broad variety of project types and development styles. Differences Between Program Vs Process vs Threads pramodbablad June 3, 2015 1 Program , Process and Threads are three basic concepts of the operating systems about which every computer science engineer must be familiar with. In this example, we shall use Eclipse. By using work-in-process (WIP) limits, you can improve the flow of work through your system. Pipes in Java IO provides the ability for two threads running in the same JVM to communicate. This in-depth tutorial is an introduction to the many functionalities supported by streams, with a focus on simple, practical examples. * * This implementation follows the example of David Flanagan's book * "Java In A Nutshell", and converts a byte array into a String * of hex characters. We have generated a sample JWT token from WSO2IS. If you need a custom written essay, term paper, research paper on a general topic, or a typical high school, college or university level assignment, you can place an order right away without prior inquiry. Test your issue against the latest Java Early Access Release available for download on the Java Development Kit Builds page. We can use Freemarker templates for different purposes like generating HTML files, emails, source code etc. For example, if we were asked to write a calculator program, we could choose many different ways for the user to enter calculations - from entering equations, pressing buttons or even writing them on the screen - but if the software can't add up correctly then it won't have solved the problem. The Work Manager API defines Work as a unit of work, which you want to execute asynchronously. In this article, we’d like to address automatic memory management for Java. This is a simple Java Program which grabs all running Process on system and prints each process line by line. Just construct a ProcessBuilder object, tell it to start, and assign the results to a Process object, and you're done. Think of the common example that is the Employee. When a MapReduce task fails, a user can run a debug script, to process task logs for example. Here, we introduce Java batch and how it is used in practice. I've presented here a simple example to illustrate how to convert stand-alone java programs (mostly, JARs) to WARs which can then be deployed in full-blown application servers (JBoss, WebSphere, etc. Examples given earlier were "spawn ssh [email protected] or spawn ftp host". It provides a core Business Rules Engine (BRE), a web authoring and rules management application (Drools Workbench), full runtime support for Decision Model and Notation (DMN) models at Conformance level 3 and an Eclipse IDE plugin for core development. On Sunday, only bupbash is executed. There is another, less popular way – using Java classes like StartEvent, EndEvent, UserTask, SequenceFlow, etc.  A Java application program is made of one or more classes and zero or more interfaces. Specify Process Environment for Security. The JCP is the mechanism for developing standard technical specifications for Java technology. You must have heard these terms while reading multithreading in java, both of these terms are related to each other. This section describes the process of Java program creation, compilation and execution. In this Java Interview Questions blog, I am going to list some of the most important Java Interview Questions and Answers which will set you apart in the interview process. Terminating a Process. exec() to launch the process, and capture the output of the process. Java threads are objects like any other Java objects. In this tutorial, learn how to configure Spring Batch to read data in CSV format, process the data in any number of files, and write the results to a MySQL. The primary class used to handle files is called File. Choose some problems from the book and try to solve them!. As an example, let’s imagine we’re creating a database of the children in a class, and the pets they have. creating array of objects in java example program Creating array of objects in java example program - InstanceOfJava This is the java programming blog on "OOPS Concepts" , servlets jsp freshers and 1, 2,3 years expirieance java interview questions on java with explanation for interview examination. Instead, the system is given a set data and tasked with finding patterns and correlations therein. Short, prototypical programs exploring the basics of programming with Processing. getRuntime(). class file). That information can be used to show the lifetime of the child process. In computing, the Java API for XML Processing, or JAXP (/ ˈ dʒ æ k s p iː / JAKS-pee), one of the Java XML Application programming interfaces (API)s, provides the capability of validating and parsing XML documents. Execute your workflows and decisions in powerful engines that are paired with essential applications for process automation projects. Example layout of a java. What is the Quartz Job Scheduling Library? Quartz is a richly featured, open source job scheduling library that can be integrated within virtually any Java application - from the smallest stand-alone application to the largest e-commerce system. Runnable interface. Open Source Software in Java Open Source Ajax Frameworks. BSD Port For a list of pointers to packages of the BSD Port for DragonFly BSD, FreeBSD, Mac OS X, NetBSD and OpenBSD, please see the BSD porting Project's wiki page. The Java thread facility and API is deceptively simple. DWR - DWR is a Java open source library which allows you to write Ajax web sites. These examples are running online through p5. Command: List of commands to be handled. There are several ways to take thread dumps from a JVM. Tasks such as compileJava and test then use one or more of those configurations to get the corresponding files and use them, for example by placing them on a compilation or runtime classpath. While executing the read and write blocks in a single thread works for simple cases, we should run these in separate threads to avoid deadlocks. ActionEvent) 2. To get length of an array, length attribute is used. Calculate process time in Java This section provides the facility to calculate the process time of the completion of the operation through the Java program. The purpose of this document is to describe, principally by means of an extended example, the process of creating a Java interface for a program written in C, C++ or Fortran. In the subsequent post I will use the below utility method to print the process information. EXAMPLES; EXERCISES; VIDEOS; DOWNLOADS; RESOURCES; GET THE BOOK; BUY ON AMAZON EXAMPLES. ProcessBuilder manages operating system process. This is the recommended way of executing HTTP requests and processing HTTP responses. You can create simple or complex workflows, depending on your needs. To use it, you can start by importing it in your file. The start() method creates a new Process instance with those attributes. Java is an object-oriented programming language. Below example have two pojo classes Student and Subject. This is a simple Java Thread Life Cycle diagram for your reference. For example, the following (unmanaged) C++ code, from the Java Native Interface documentation set, creates a JVM from a standard (unmanaged) process 1: #include "stdafx. Java's Color data type represents color values using the RGB color model where a color is defined by three integers (each between 0 and 255) that represent the intensity of the red, green, and blue components of the color. The Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket specifications are developed under the Java Community Process. If you want to send email by using your SMTP server provided by the host provider, see the example after this one. Suppose that you have an XML document called input. Example On Hibernate Delete Query Hibernate » on Jun 12, 2011 { 10 Comments } By Sivateja T his is the program to Delete a row (Object) from the database, just like using delete query in the jdbc program. You might want to look at examples from here to compare Java with solutions in dynamic languages. To facilitate this process, most modern web browsers contain a JVM. Finally, there are more examples of using the Java Driver in the Quick Tour, and there is example code in github, including examples for authentication. Console input is any input that is entered in the console window instead of typing it into a field or dialog box that pops up in a window. process_time(). JSP - Servlets: Full Login Example In this section we are going to discuss the implementation of a complete Login application (We received the source code of this application through Amira Thabet). Invoking an external process from Java appears easy enough but there are sooo many gotchas to watch out for. Compile it by typing "javac MyProgram. Brainstorming is useful in creating flowcharts as individuals do not have knowledge of the entire process. Pentaho Kettle Component. getRuntime() problems? Commons "exec" seems to be simple (with killing process from java example) Killing system process from java ; Simple java program to run bash under windows. What is Encapsulation in Java? Encapsulation is process of wrapping code and data together into a single unit. On windows platform, how to use java code to kill a process?? For example, I start a process called flashfxp. A workflow process definition relates to a workflow instance in the same way that a Java class definition relates to an instance of that class. For examples that show the complete process, see Examples of the Complete Version 4 Signing Process (Python). It's designed to be powerful but still simple to use. A full-featured, Java-based, In-process job scheduler. This tutorial explains how to compile and run a Java program from command prompt in Linux and Windows? Compilation and execution of Java program is a two step process. org is an excellent open source set of programs that allow you to turn your Java classes into Windows services. In order to adapt the code to model a process other than cruise control, the equation in the PV timer tick event handler should be changed. Because it is Java, the API can be invoked from within a servlet, thus giving access to Excel spreadsheets over internet and intranet web applications. At the same time, a second thread. The process of calling C or C ++ from Java programs consists of six steps. This example demonstrates how to work with serialized Java objects in embedded forms. You can negate any of the selections that you have chosen by using the -N switch. Below example have two pojo classes Student and Subject. This program corresponds to the Coding a Simple Graphical User Interface - Part I. While running, these programs are represented by a java. The BPMN Process used in this example. For example, it is common for each conceptual argument to be an element in this list, but there are operating systems where programs are expected to tokenize command line strings themselves - on such a system a Java implementation might require commands to contain exactly two elements. Math package are class methods. It discusses constructors, initializers, instance initialization () methods, initialization and inheritance, object images on the heap, and the order in which an object's variables get initialized. This guide walks you through the process of creating a basic batch-driven solution. All Java programs have at least one thread, known as the main thread, which is created by the Java Virtual Machine (JVM) at the program's start, when the main() method is invoked with the main thread. In Java programming, many of these components are pre-created and commonly used. You can allocate an array of bigger type instead. tcl" and type "ns ns-simple. The Work Manager API defines Work as a unit of work, which you want to execute asynchronously. Because it is Java, the API can be invoked from within a servlet, thus giving access to Excel spreadsheets over internet and intranet web applications. Environment: System. Invoking Processes from Java. Flowchart - Nomination & Confirmation Process. Enjoy Never fear Business Process Management again as you will love Camunda. The input–process–output (IPO) model is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or another process. In addition to being objects, java threads can also execute code. Suppose you have a running Java process and you would like to inspect its running status, for example how many object instance are created or memory consumption status, you can use some standard tool provided by JDK.