Introduction to java tools in jdk14

The story happened

In the era of no IDE, experts still program through Notepad. At that time, people who could write programs were all cattle. The one who can write the program well is the bull among the cattle.

The bald uncle's programmer image was established at that time.

I still remember that spring more than ten years ago, the breeze did not move, and the sun blushed. Because at that time, I was still in a javac, a java compiler, running Java programs.

Although the efficiency is low, I am filled with joy when I watch one Hello world after another.

After the surprise, I was lost. Java is too difficult to use and too complex. I'd better go back and write C language.

Until one day, someone recommended eclipse to me. It was like a lightning bolt illuminating my direction. Since then, go to hell with javac and Java. I just want eclipse.

Many years later, I switched from eclipse to idea, and development tools became more and more popular. Then I almost forgot that Java originally provided a series of java tools for us to use.

They all said that we should not forget our original intention, so with the release of jdk14, I reviewed the tools provided by java tools again and found a surprise.

Introduction to java tools

Jdk14 provides up to 31 tools. I'm ashamed that I only know some of them when I see them for the first time. A scholar knows shame and then courage, so I worked hard and finally knew them all today.

31 a tool. I'll briefly introduce it here, and then make a special description for complex and particularly useful tools.

jaotc

A Java static compiler that generates native code for compiled Java methods.

jar

The jar package is familiar to everyone. Using the jar command can be used to package and unzip jar files.

jarsigner

After typing the jar package, use jarsigner to sign and authenticate the jar package.

java

Using Java, you can run Java programs.

javac

Javac is used to compile java files and text files into binary class files.

javadoc

Javadoc can generate HTML pages from the comments written in the code for your reference. If you have seen the source code of JDK, you can see that many comments are written in the source code. You can learn. Because comments are important.

javap

Java's own decompile tool can decompile binary class files into human readable code.

This decompiler may not be as powerful as the IDE's own decompiler.

jcmd

D here represents diagnostic. You can debug the running JVM through this command.

This is a very useful debugging tool, which will be explained in detail in later articles.

jconsole

Jconsole is a GUI client that can manage existing Java programs.

Their connection protocol is JMX. I don't know why domestic companies seem to rarely use JMX. um... This problem will be studied when I have time.

jdb

Java debugger (JDB) is a command-line debugging tool, which provides a series of functions of debugging programs.

jdeprscan

Jdeprscan is an analysis tool used to scan the deprecated API in jar or class files.

jdeps

Jdeps is a Java class dependency analysis tool.

jfr

Jfr is the abbreviation of Java flight recorder, and jfr is the analysis tool of Java application. It can collect a series of events generated by the JVM during operation, generate files and analyze them.

We will explain jfr in detail in an article later.

jhsdb

Jhsdb is an analysis tool that can analyze running Java programs or coredump.

jinfo

Jinfo generates runtime Java configuration information for specific Java processes.

jjs

Jjs is used to run nashorn engine.

jlink

Java has been modularized since jdk9. JLINK can organize modules and their dependencies to generate a custom runtime environment.

jmap

Jmap can print out the heap information of a java process. We will explain it in detail in the following articles.

jmod

Jmod is used to create and parse jmod files.

jpackage

Jpackage can be used to package self running Java programs.

jps

List the Java processes on the machine.

jrunscript

Start a command line shell that supports interactive and batch modes.

jshell

An interactive Java shell environment.

jstack

Print Java stack information, which is mainly used in debug. We will explain it in detail later.

jstat

Statistics used to monitor the JVM.

jstatd

Jstatd is an RMI service program used to remotely monitor the JVM.

keytool

Tools for generating and managing keys and certificates.

rmic

The stub and skeleton classes used to generate remote method calls.

rmid

Start a daemon that allows objects to be registered and instantiated in the JVM.

rmiregistry

Create a register of RMI objects.

serialver

Generate serialVersionUID for one or more classes.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>