Skip to main content

Questions tagged [javap]

javap - The Java Class File Disassembler

javap
9 votes
2 answers
1k views

Inner Class in Java

I was reading about Inner class in Learning Java. I found this code class Animal{ class Brain{ } } After compiling, javap 'Animal$Brain' gives output as Compiled from "Animal.java"class ...
Ashish Pani's user avatar
  • 1,011
0 votes
2 answers
169 views

the constant pool lost #3 in class file

I use "javap -verbose" to parse a class file and find the constant pool lost #3, anybody can tell me the reason?
maomao's user avatar
  • 81
0 votes
1 answer
288 views

Getting the arguments for the bytecode using Javassist

The disassembled code (using javap -c) of http://lpaste.net/338173 looks like this: http://lpaste.net/338175 , on the third column, there is 200 as an argument to "sipush" how can I get this from a ...
Vasantha Ganesh's user avatar
0 votes
1 answer
558 views

No javap tool not found in Scala REPL

I am using Scala 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_79) on Windows 10. I did following in REPL scala> class Book (val title:String) defined class Book scala> :javap :javap [...
Maz's user avatar
  • 193
0 votes
1 answer
451 views

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 = ...
Flot2011's user avatar
  • 4,621
2 votes
3 answers
2k views

Java class has 2 methods with the same function signature but different return types

AFAIK it's not possible to have a method with the same call signature. However: $ javap -public java.time.LocalTime | grep "minus" | grep "Temporal" | grep -v "long" public java.time.LocalTime ...
Saurabh Das's user avatar
1 vote
0 answers
2k views

setting the target version to 1.8 still produce the class files with major version 52

I am trying to compile my java source code to target 1.8. I have set the following in the javac target. Ant version: Apache Ant(TM) version 1.9.4 compiled on April 29 2014 Java version: 1.8 <...
Mayuran's user avatar
  • 708
3 votes
2 answers
3k views

Using javap for reading the byte code

I figured out by reading in the internet that java compiles public class Test { private String s = "TESTTEST"; } to public class Test { private String s; public Test() { s = "...
mrbela's user avatar
  • 4,617
3 votes
2 answers
378 views

java javap and groovy bytecode comparison

Here is the code generated showed by javap when I asked him to display my compiled class (I selected method) int multiply(int, int); flags: Code: stack=2, locals=3, args_size=3 0: ...
lapots's user avatar
  • 13.2k
0 votes
1 answer
506 views

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 <JAR> | awk '{print $8}' | grep class$ | sed 's/\.class$//' | xargs javap Where <JAR> is the ...
venkat's user avatar
  • 1
2 votes
0 answers
62 views

Can I stabilize the output order of functions written by the compiler to bytecode .class files?

If I execute javap on my main application class across compiles (no source change), sometimes the order of functions differs. This is especially true if the build was executed in different ...
Chris Betti's user avatar
  • 2,873
5 votes
1 answer
835 views

Is javap missing some line numbers?

If I compile the following source code: 1. public class Example { 2. public boolean foo(boolean a, boolean b, char ch) { 3. if (a && Character.isLetter(ch) 4. || b &&...
josecampos's user avatar
0 votes
2 answers
1k views

Find out if .class file implements interface [duplicate]

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 ...
J Fabian Meier's user avatar
0 votes
0 answers
156 views

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 ...
Vinod's user avatar
  • 9
7 votes
1 answer
945 views

Enum disassembled with javap doesn't show constructor arguments

When I disassemble an enum with javap, the enum's implicit constructor arguments seem to be missing, and I can't figure out why. Here's an enum: enum Foo { X } I compile and disassemble this (on ...
Boann's user avatar
  • 49.5k

15 30 50 per page
1 2 3
4
5
9