1

This question already has an answer here:

I have ubuntu 13.10 and I am trying to use a disk that contains a book, How to program Java, 7th edition. It is the Linux version CD and I can't figure out what program to use so I can look at the files on it.

All of the files are in .class format. I have used the windows version on another pc and it seems to work fine with jgrasp, is there something else I should be using to edit and create java programs with the .class extension?

marked as duplicate by Eric Carvalho, qbi, Avinash Raj, BuZZ-dEE, Amith KK Feb 27 '14 at 17:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What exactly are you looking for? An IDE? Any old text editor can open .class files iirc. – Seth Feb 26 '14 at 21:30
  • any editor that would open .class files. I can't seem to open any of the .class files. I am about ready to just give up. – user252400 Feb 27 '14 at 3:16
0

Let me suggest you have HelloWorld.class file inside some directory. To run it, you simply should type in this directory:

java HelloWorld

To run jar archive, use -jar key:

java -jar MyProgram.jar

To select java machine, type:

sudo update-alternatives --config java

To install Oracle JDK:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-jdk7-installer

After installation, you can select it as default java.

Not the answer you're looking for? Browse other questions tagged or ask your own question.