PDA

View Full Version : [ubuntu] Issues running Java class files



Emora
August 15th, 2011, 01:07 AM
I'm not sure what I am looking for to open one of the Java files I have. What do I need to open it?

-Emora

trozamon
August 15th, 2011, 01:55 AM
open a command prompt and type:


sudo apt-get install default-jre

wait for it to install, then type


java thefilename

Note that the .class is not included with the file name, and that the name is case sensitive

SavageWolf
August 15th, 2011, 01:59 AM
Remember to mark it as executable, right click > Properties > Permissions > Allow executing file as program. Then you should be able to just double-click it.

Emora
August 15th, 2011, 02:24 AM
open a command prompt and type:


sudo apt-get install default-jrewait for it to install, then type


java thefilenameNote that the .class is not included with the file name, and that the name is case sensitive



Package jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package default
E: Package 'jre' has no installation candidate


:confused::confused::confused:

What now?
-Emora

trozamon
August 16th, 2011, 01:40 AM
Alright, open up synaptic and search for "jre", then install one.

Then complete the rest of my instructions