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
3 answers

is there difference between classes compiled with java 1.5 and 1.5.0_06

I have compiled a class with java version 1.5. When i deployed it in the server it gave me bad version error. If i compile it with java version 1.5.0_06 does that make a difference if the server is having java of version 1.5.0_06 1.Does the last…
Sandeep
  • 2,041
  • 21
  • 34
0
votes
0 answers

Java: Safety of rewriting bytecode to add interface

To try to forestall any concern, this is for a personal project. I'm more interested in learning about the internals of the jvm than I am in hearing about what a horrible idea this is :) Normally, java does not allow you to implement a generic…
David Kleszyk
  • 642
  • 3
  • 10
0
votes
2 answers

How to get the output of javap to multiple text files

I know this is a simple question but I am quite new to programming and I want to know if there is a way to get the output of a javap file to multiple different named text files. Eg. In the case of one output file it would be javap -c abc.class >…
Cat-M.bit
  • 17
  • 1
  • 4
0
votes
1 answer

Does the instruction istore start at index 1 in the main method?

Given the instruction istore_ and its documentation: n must be an index into the local variable array of the current frame (§2.6). It does not specify what index it starts at. I assume 0. And for a given istore operation it should increment by…
gel
  • 281
  • 3
  • 19
0
votes
1 answer

Where can I find the source code for javap application?

javap is the Java Class File Disassembler. Which, in my system, is an application that belongs to Oracle JDK. $ javap -version 1.8.0_201 $ which javap /opt/jdk1.8.0_201/bin/javap $ head -2 /opt/jdk1.8.0_201/COPYRIGHT Copyright � 1993, 2018, Oracle…
nephewtom
  • 2,941
  • 3
  • 35
  • 49
0
votes
2 answers

Angular braces notation for types resulted by javap

In java profiler command output, I've been seeing these notations in angular braces like java.util.Queue java.util.TreeMap Correct me if I'm wrong; working through some exercises, I've been able to relate E-Entity, K,V - Key-Value pair.…
Sai Kiran
  • 61
  • 7
0
votes
0 answers

use javap from within a java program on all the files

I have to implement javap -verbose from within a java program, the directory named folder has multiple classes and i want to use this javap -verbose on all of them so i do, Process p = Runtime.getRuntime().exec("javap -verbose folder/*"); in my…
F_society
  • 1
  • 1
0
votes
0 answers

javap not showing the annotation information in the decompiled class

I have a jar with a simple java class like below package org.debraj.pkgcmp.dummy; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import com.google.common.annotations.VisibleForTesting; public class…
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
1 answer

Is it possible to estimate performance or cyclomatic complexity from decompiled code?

Let's say I have two alternative implementations of an algorithm, or two strategies. I could of course benchmark them with e.g. jmh. But is there any information I could get by looking at the decompiled bytecode? A very native example would be…
garci560
  • 2,993
  • 4
  • 25
  • 34
0
votes
3 answers

Why is my javap output different than yours for the same jar file?

I'm having trouble compiling code which has a maven dependency on jline-0.9.94. Specifically, I'm compiling Groovy 1.7.6 using its default Ant target and getting the following error: [...] -banner: [echo] Java Runtime Environment version:…
Lyle
  • 3,724
  • 3
  • 25
  • 25
0
votes
1 answer

Bad local StackMapTable

I've generated a simple getter method with ASM in an already existent class. mv = cn.visitMethod(access, // public method "get_" + f.name, // name "()Ljava/lang/String;", //…
FFY00
  • 82
  • 1
  • 10
0
votes
1 answer

Understanding Type in Compiled Scala File

Given: $cat build.sbt scalaVersion := "2.12.1" $cat src/main/scala/net/X.scala package net trait Foo object X { val a: Int with Foo = 42.asInstanceOf[Int with Foo] println(a + a) } After compiling it via sbt compile, I javap'd the…
Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384
0
votes
2 answers

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
  • 61
  • 2
  • 2
  • 6
0
votes
1 answer

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 class file using javassist?
Vasantha Ganesh
  • 4,570
  • 3
  • 25
  • 33
0
votes
1 answer

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 [-lcsvp] [path1 path2 ...] scala> :javap -c Book Failed:…
Maz
  • 193
  • 2
  • 10
1 2 3
8 9