The Javap command is often used to compile Java files, which is mainly used to analyze Java. When learning Thinking in Java, it is necessary to compile the files to see what the code we wrote for the JVM. Optimize and process, for example, the use of the use of+= stitching of the string, JVM processing method. Not much nonsense, the tutorial with configuration is directly below:
Click Run ---> External Tools ---> External Tools Configurations ... and then click New as shown below.
enter:
Name: javap
Local
Working Directory: $ {Workspace_LOC}/$ {Project_name}
Arguments: -ClassPath bin -c $ {java_type_name}
Note: $ {workspace_loc} indicates the path where the working space is located;
$ {Project_name} indicates the name of the project;
$ {java_type_name} indicates the name of the selected java file (full name);
The above variables can be selected through the Variables button at the bottom right of each column. (About some other variable readers can understand it by themselves)
The content of Arguments: -ClassPath represents the class path of Javap named search (BIN indicates that it is relative to the project's relative path) -c indicates that the JVM bytecode will be generated here as shown in the figure below:
Then click Run, there may be the following errors:
The above error appears, indicating that you have not selected Java files, and then select a java file, click Javap, check the counter -compilation results, and by the way, you may not know Go there and click Javap:
The above is all the contents of this article. I hope it will be helpful to everyone's learning.