1

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?

terdon
  • 104,119

1 Answers1

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.

Danatela
  • 13,384