Page 1 of 1

Java! cause it ain't coffee no more.

PostPosted: Thu Aug 25, 2005 12:53 am
by Slater
I got all this kewl Java engineering software now and have made a few simple programs, but my question is this... how do you view .class files after compiling them from .java?

PostPosted: Thu Aug 25, 2005 1:35 am
by Warrior4Christ
Once it's compiled, it isn't really intended to be viewed, but some Java IDEs like JBuilder X and I think also NetBeans do let you view the code of class files by opening it normally (although not to the same extent - variable names and function names are lost...). Borland JBuilder is recommended and it is what I use. There is a free version available (Google it), and also NetBeans is free.

PostPosted: Thu Aug 25, 2005 3:36 am
by LorentzForce
Viewing them? You mean, execute them?

If it's just viewing them they're binary, so you actually can't, unless you decompile it and it'll be just what W4C said above. Code with many things missing.

If you want to execute/run it, it depends. If it's an applet, you shove it into a, say, a .html file (imbedding is the word I think) and run it from there. Otherwise, try typing
Code: Select all
java YourProgramClass
into your command line.

PostPosted: Thu Aug 25, 2005 4:57 pm
by Mithrandir
I'd personally use the word "embedding" but that may just be personal preference. ;)