Questions tagged [javap]

javap - The Java Class File Disassembler

javap - The Java Class File Disassembler:

The javap command disassembles one or more class files. Its output depends on the options used. If no options are used, javap prints out the package, protected, and public fields and methods of the classes passed to it. javap prints its output to stdout.

124 questions
0
votes
1 answer

Understanding javap output

I have a very simple class: package MyDev; public class Point3D { public Point3D(){x = 0; y = 0;z = 0;} public float x, y, z; public Point3D( float X, float Y, float Z ) { x = X; y = Y; z = Z; } } When I run javap -c on…
Flot2011
  • 4,601
  • 3
  • 44
  • 61
0
votes
1 answer

how do i print class, method details in a jar file using the javap?

I want to list the classes in jars which are using java.lang.String.replace method. jar tvf | awk '{print $8}' | grep class$ | sed 's/\.class$//' | xargs javap Where is the name of the jar you want to examine.
venkat
  • 1
  • 1
0
votes
2 answers

Find out if .class file implements interface

Given the path to a class file, how can I find out if it implements a certain interface? I could use javap and parse the output, but there are probably more intelligent ways. I do not want to parse the source code because it may not be available. I…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
0
votes
0 answers

Visualized javap tool

Hello I've created this tool And I've added a feature that anyone can search for the info of a class without any package name. My question is now I want to add info of each method that means I need to get info from javadoc html files so tell me I…
Vinod
  • 9
  • 6
0
votes
2 answers

How to read the metadata for the mnemonics produced by disassembled Java Bytecode?

I've never used Javap before. Could someone explain what "Code" means in this example? It shows up threes time. What does it mean in the context of the mnemonics that follow on the lines below it? Does it indicate that there is another Stack frame…
coderrick
  • 1,011
  • 1
  • 8
  • 25
0
votes
1 answer

Where is the method getDriver initialized in java.sql.DriverManager in JAVA?

I was going through classes in sql package. And i happened to look through the methods in DriverManager.class by "javap DriverManager.class". It shows a method of Driver class- get Driver , if i am not wrong. (Do correct me and tell me the correct…
Kirty Bhushan
  • 147
  • 2
  • 12
0
votes
0 answers

Can we Use Javap command inside a java program?

I need to write a program where I can track the way how methods are called. So , i'm trying to use invokestatic, invokevirtual , invokeinterface , invokespecial to track the method calls and follow up. To do that , I have to input the result of…
Huzaim
  • 115
  • 4
  • 13
0
votes
2 answers

A case of compiler optimized bytecode

I once commented at here. Which I suggested that the limit should pre-declared with a.length / 2. And a guy told that he believes the compiler will enhance it anyway So I tried. public class Loop1 { public static void main(final String[] args)…
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184
0
votes
3 answers

output of javap command

I inspected my class file using javap command, I am unable to understand the below part Classfile /D:/WaitNotifyExample.class Last modified Dec 20, 2013; size 622 bytes MD5 checksum 4781f8cf8062fa75efa30c76adc25cfb Compiled from…
MaheshVarma
  • 2,081
  • 7
  • 35
  • 58
0
votes
4 answers

Where is jar for java.io.File?

When I need to get method signatures for android.content.ContextWrapper, I go to "C:\Program Files (x86)\Android\android-sdk\platforms\android-18" where android.jar is placed and then execute javap -s -classpath android.jar…
Nick
  • 3,205
  • 9
  • 57
  • 108
0
votes
4 answers

Given a class file, how to detect it uses JNI or not?

I have some Java benchmarks with only class files. I would like to find which benchmarks have JNI calls. I thought maybe this can be done from the bytecode level with the help of javap -c, but not sure. Any ideas?
JackWM
  • 10,085
  • 22
  • 65
  • 92
0
votes
3 answers

Time complexity measure of JDK class methods

Is there an established way of measuring (or getting an existing measure) a JDK class method complexity? Is javap representative of time complexity and to what degree. In particular, I am interested in the complexity of Arrays.sort() but also some…
amphibient
  • 29,770
  • 54
  • 146
  • 240
0
votes
0 answers

Executing a terminal command in a java progam

javap -classpath /Users/amol/Documents/Java/ -l -c a When I execute the above command in my terminal the output shows the function names in my class along with the local variables Process process3 = Runtime.getRuntime().exec(new String[]{ …
Blood Sport
  • 125
  • 1
  • 2
  • 12
0
votes
2 answers

Jasmin how to force long field to be long constant?

I managed to isolate my problem in this test case: .bytecode 50.0 .class public test .super java/lang/Object .field public static final foo1 J = 1 .method public ()V .limit stack 1 .limit locals 1 .var 0 is this Ltest; from…
luiscubal
  • 24,773
  • 9
  • 57
  • 83
-1
votes
1 answer

Java byte code classes interpretation

I understand the basic Java bytecode instructions and how fields are referred from the constant pool. But I cannot make my mind around the differences between these 2…
Ben
  • 337
  • 4
  • 10
1 2 3
8
9