The release of Java 12 with new features has added another feather in the cap of popular programming language. Developers across the world still use this programming language largely because of its multiplatform support i.e. the ability of Java programs to execute on different machines with the use of Java Runtime Environment or JRE.
Java command line tools can help developers during the software development process. Java is bundled with several tools that make the task easier. Here are five Java command line tools that help developers master the programming language.
#1. Java compiler: javac
The javac is the most useful command-line tool that you can find in JDK’s bin directory. Javac tool powers all the IDEs right from Maven, Gradle, SpringSource IDE or Jenkins Cl. If you encounter a difficult problem in Java project’s build and deployment pipeline, you can use this tool to troubleshoot the basic components.
#2. Java statistics aggregator: jstat
If you encounter a runtime problem with your application, you can simply use the jstat utility. The most commonly trend Java virtual machine (JVM) parameters are the heap size and Java Runtime Environment (JRE) garbage collection algorithm.
#3. Java dependency manager: jdeps
Java 12 supports adding references to internal APIs and not compile. If you simply want to check if any part of your existing code uses an internal Java API, the jdeps application can help you figure out. Jdeps often give a suggestion about a newer, preferable API that you can use to replace the bad one.
#4. Java archive utility: jar
The main purpose of jar utility is to create a compressed archive file. There are other features of the command line tool that can be used as well. Jar utility can also be used to specify the entry point for executable or embedded JAR files. They can be useful when you want to compare one version of a code release to another.
#5. Java profiler: javap
The command-line tool javap complements the javac utility. When javac compiles code, this utility tool reverses the compilation and provides information about a compiled class. Javap JDK tool does not return a compile class into its original source format but it offers insights on how the original source code was assigned.