Java! cause it ain't coffee no more.

The geek forum. PHP, Perl, HTML, hardware questions etc.. it's all in here. Got a techie question? We'll sort you out. Ask your questions or post a link to your own site here!

Java! cause it ain't coffee no more.

Postby Slater » Thu Aug 25, 2005 12:53 am

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?
Image
User avatar
Slater
 
Posts: 2671
Joined: Sat May 22, 2004 10:00 am
Location: Pacifica, Caliphornia

Postby Warrior4Christ » Thu Aug 25, 2005 1:35 am

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.
Everywhere like such as, and MOES.

"Expect great things from God; attempt great things for God." - William Carey
User avatar
Warrior4Christ
 
Posts: 2045
Joined: Sat Aug 20, 2005 8:10 pm
Location: Carefully place an additional prawn on the barbecue

Postby LorentzForce » Thu Aug 25, 2005 3:36 am

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.
Image
User avatar
LorentzForce
 
Posts: 1263
Joined: Sun Jun 01, 2003 3:18 am
Location: Between B and E

Postby Mithrandir » Thu Aug 25, 2005 4:57 pm

I'd personally use the word "embedding" but that may just be personal preference. ;)
User avatar
Mithrandir
 
Posts: 11071
Joined: Fri Jun 27, 2003 12:00 pm
Location: You will be baked. And then there will be cake.


Return to Computing and Links

Who is online

Users browsing this forum: No registered users and 151 guests