This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes .class Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark ".class Files" Watch ".class Files" New topic

.class Files

Cristina Proenca

Joined: Oct 10, 2002
Posts: 12
Can someone please tell wich is the correct programme to open .class files?

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

.class files are java programs. they are run by the VM. they are usually opened either by a browser(applets) or a server(servlets). to run an applet you can make a simple html file that embeds the class file like this:
<APPLET CODE="Star.class" HEIGHT="20" WIDTH="20"></APPLET>
at least for Java 1 applets. the html is different for Java 2 applets.
put the class file in the same folder as the html file. then just doubleclick the html file.
i havent written a lot of "applications" in java (1) so i forgot how to run them.
[ January 06, 2003: Message edited by: Randall Twede ]

Visit my download page
I agree. Here's the link:
subject: .class Files
jQuery in Action, 3rd edition