Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
"javap jar:file:" - Specify Bytecode in JAR
How to specify Bytecode in a JAR file for the "javap" command?
✍: FYIcenter
If the bytecode is stored in *.class file,
you can specify the bytecode for the "javap" command using the
class file path name directly.
For example:
> javap HelloWorldFrame.class > javap \Users\fyicenter\HelloWorldFrame.class
If the bytecode is stored in *.jar file, you can specify the bytecode for the "javap" command using the "jar:file:" syntax:
> javap 'jar:file://absolute_path!/class_path' > javap 'jar:file:relative_path!/class_path'
1. Compile HelloWorldFrame.java used in the last tutorial into a bytecode file, HelloWorldFrame.class:
> javac HelloWorldFrame.java
2. Build a *.jar file with source code and bytecode:
> jar --create --file hello.jar HelloWorldFrame*.* > jar --list --file hello.jar META-INF/ META-INF/MANIFEST.MF HelloWorldFrame$1.class HelloWorldFrame.class HelloWorldFrame.java
3. Run "javap" command on a bytecode in the *.jar file:
> javap 'jar:file:./hello.jar!/HelloWorldFrame.class'
Compiled from "HelloWorldFrame.java"
public class HelloWorldFrame extends javax.swing.JFrame {
java.lang.String message;
public HelloWorldFrame();
public static void main(java.lang.String[]);
}
> javap 'jar:file:///Users/fyicenter/hello.jar!/HelloWorldFrame.class'
Compiled from "HelloWorldFrame.java"
public class HelloWorldFrame extends javax.swing.JFrame {
java.lang.String message;
public HelloWorldFrame();
public static void main(java.lang.String[]);
}
2021-09-09, ∼1563🔥, 0💬
Popular Posts:
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...
What Is poi-scratchpad-3.5.jar? poi-scratchpad-3.5.jar is one of the JAR files for Apache POI 3.5, w...
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
JDK 11 jdk.jcmd.jmod is the JMOD file for JDK 11 JCmd tool, which can be invoked by the "jcmd" comma...
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...