Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java assembler?? for Javap utility??

Reply
Thread Tools

java assembler?? for Javap utility??

 
 
TenderHeart
Guest
Posts: n/a
 
      04-29-2005
when a small program like

class Hello{

public static void main(String arg[])

{

System.out.println("HEllo World");

}

}

was compiled and then the i took the java byte code instruction
through JAVAP option
the byte code instructions for the above program was

Compiled from "Hello.java"
class Hello extends java.lang.Object{
Hello();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>")V
4: return

public static void main(java.lang.String[]);
Code:
0: getstatic #2; //Field
java/lang/System.out:Ljava/io/PrintStream;
3: ldc #3; //String HEllo World
5: invokevirtual #4; //Method
java/io/PrintStream.printlnLjava/lang/Str
ingV
8: return

}
without giving the program "Hello.java"
to the JVM how can i run the "Hello" program through JVM by giving the
above byte code instructions "which was gained by using the javap
option" to the JVM??


basicaly I want to get the output of "Hello World" by giving the below
byte code instructions to the JVM
(what I need to do is that assemble the byte code which was
disassembled
and make it to the .class format so I can run the above programme
through JVM )

Compiled from "Hello.java"
class Hello extends java.lang.Object{
Hello();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>")V
4: return

public static void main(java.lang.String[]);
Code:
0: getstatic #2; //Field
java/lang/System.out:Ljava/io/PrintStream;
3: ldc #3; //String HEllo World
5: invokevirtual #4; //Method
java/io/PrintStream.printlnLjava/lang/Str
ingV
8: return

}

If somebodyt know about a java tool I can use to assemble the code wich
i disassembled please advice me!!!!

my e-mail: http://www.velocityreviews.com/forums/(E-Mail Removed)

thanks

- Malinda

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Daniel_Sj=F6blom?=
Guest
Posts: n/a
 
      04-29-2005
TenderHeart wrote:
> If somebodyt know about a java tool I can use to assemble the code wich
> i disassembled please advice me!!!!


I don't think there are any programs that turn /javap/ output into a
classfile, but there are other java assemblers. See google:
http://www.google.com/search?hl=en&q=java+assembler

--
Daniel Sj÷blom
Remove _NOSPAM to reply by mail
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can we invoke tools { like javac , javap} in java program ? ram Java 5 08-26-2007 01:17 PM
javap issue S.Marion Java 5 02-28-2006 06:22 PM
mnemonics<->opcodes map and format of output of the javap utility Albretch Java 4 10-02-2004 07:31 PM
Java Web Start Security - Can others 'javap' our class files from client machine? Deshaies Java 8 04-25-2004 11:49 PM
Classpath problem: javap is able to locate one class in a jar but not the other. Chandresh Prakash Java 1 12-05-2003 12:43 PM



Advertisments