Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2005

Tip: Looking for answers? Try searching our database.

java assembler?? for Javap utility??

Thread view: 
TenderHeart - 29 Apr 2005 18:13 GMT
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.println:(Ljava/lang/Str
ing;)V
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.println:(Ljava/lang/Str
ing;)V
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: malinda.fernando@gmail.com

thanks

- Malinda
sanjay manohar - 30 Apr 2005 21:27 GMT
googleing for java assembler gives "javaa" and "jasmin"

mrl.nyu.edu/~meyer/jasmin/
www.netsw.org/softeng/ lang/java/bytecode/assembler/javaa/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.