Questions tagged [.class-file]

Class files are the format used by the Java Virtual Machine.

Class files are the format used by the Java Virtual Machine. Java programs are typically compiled into class files, which may be bundled into a jar archive.

283 questions
0
votes
0 answers

Accessing the LineNumberTable from .class file

LineNumber[] ln = new LineNumber[300]; LineNumberTable lnt = new LineNumberTable(LineNumberTable c); ln = lnt.getLineNumberTable(); Query 1 : I don't know what I should be passing as parameter for the constructor of LineNumberTable. Query 2: How…
Daanish
  • 1,061
  • 7
  • 18
  • 29
0
votes
3 answers

Unknown class file creation by Eclipse java

Hi I am working on a java project. I am using eclipse as an IDE. I have a file FileProvider.java in the package com.ibm.wala.util.io. For this file Eclipse is making two class files FileProvider.class and FileProvider$EclipseUtil.class. Can someone…
neel
  • 8,399
  • 7
  • 36
  • 50
0
votes
1 answer

constant pool patching

I was looking through the OpenJDK class file parser source and I came across something I've never heard of - Constant Pool Patching. What is this? I've read the JVM specification before but it didn't mention anything like this, and searching on…
Antimony
  • 37,781
  • 10
  • 100
  • 107
0
votes
2 answers

Inserting magic number into class files

I have a jar in which all of the class files have their magic number and type removed, I am not very knowledgeable about this specific area. What would be the best way to go about adding back in 0XCAFEBABE and the type back into each classfile and…
SwipeX
  • 11
  • 5
-1
votes
1 answer

'package does not exist' using javac to convert .java class with google play services imports

I have a .java class which uses imports from google play services. I want to put this class in a .jar to package with my project, but using javac filename.java in the terminal gives me a bunch of errors e.g. androidSCAR.java:3: error: package…
-1
votes
1 answer

How do I fix UnsupportedClassVersionError when running in Eclipse?

I am trying to run a Java Application in Eclipse. I ran it about a month ago and it worked, and I can't think of what has changed. When I try to run it now, I get this error: java.lang.UnsupportedClassVersionError: data_validation/Validation has…
-1
votes
1 answer

Vscode create java project only two folders lib and bin

When I create a java project, there are only two folders lib and src, and not files such as .classpath or .project, I know that is integrated into the terminal of vscode enter image description here But I want to output the class file to the bin…
chiwa Ando
  • 18
  • 1
-1
votes
2 answers

Why is the attribute_name_index in JVM Classfile an index?

This page https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7 says For all attributes, the attribute_name_index must be a valid unsigned 16-bit index into the constant pool of the class. However, I'm wondering if that this…
knium_
  • 93
  • 6
-1
votes
1 answer

Java 11 class file specification

I am trying to find the class file specification for Java 11 in order to find the differences between 11 and 8 LTS versions. I have found it for Java versions 8, 9 and 10, but not for 11:…
lol pol
  • 17
  • 5
-1
votes
1 answer

How to import .class files in eclipse?

I have a project which I want to import in eclipse and it has all files in .class format, If I create any file in eclipse its in .java format. The application is created in the spring framework. I tried to import the project by .war file. But It…
Sid
  • 2,792
  • 9
  • 55
  • 111
-1
votes
1 answer

Editing a String in a .class file

Issue Hey. I've been developing a game and in the game, I was showing the version "1.0.13", and I quickly realized that it was completely incorrect, and it should display "1.9". I edit my code in Eclipse, and I didn't make backups for my code each…
Johann
  • 187
  • 1
  • 4
  • 11
-1
votes
2 answers

How to read java class file as a java string?

I have a requirement in which I need to read java class file as a string in java. my code is String path = "C:/java/MainClass.class"; String content = new String(Files.readAllBytes(Paths.get(path))); When ever I print content variable, I am…
vjnan369
  • 833
  • 16
  • 42
-1
votes
2 answers

Java compiled class file

While I was going through the java inner class section, I read about compiler creating a separate .class file for the inner class which is in $.class format. Later I found that for every outer class constructor as well, it creates a separate .class…
Maneesh
  • 119
  • 10
-1
votes
3 answers

How do I tell SVN not to ignore .class files?

Here's the situation. I use Maven to manage dependencies and compile and deploy the project in development, and that's fine. But in test and production, the machines don't have Maven, so I need some easy way to have compiled the project for manual…
dwjohnston
  • 11,163
  • 32
  • 99
  • 194
-1
votes
5 answers

Why is a .class file not human readable?

When a java file is compiled, it generates a .class file. Now this .class file has the bytecode which the JVM interprets. when we open the .class file in a text editor, it is not human readable. Now to view the bytecode a disassembler like javap can…
DesirePRG
  • 6,122
  • 15
  • 69
  • 114
1 2 3
18
19