Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed JDK-7 on to my Ubuntu 12.10 and JDK is not running in any of my browsers but I can right click a .jar file and it will give me the option to open with OpenJDK Java 7 Runtime. I can also type "java into my terminal and get this


Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32      use a 32-bit data model if available
    -d64      use a 64-bit data model if available
    -server   to select the "server" VM
    -zero     to select the "zero" VM
    -jamvm    to select the "jamvm" VM
    -avian    to select the "avian" VM
                  The default VM is server,
                  because you are running on a server-class machine.

-cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property -verbose:[class|gc|jni] enable verbose output -version print product version and exit -version:<value> require the specified version to run -showversion print product version and continue -jre-restrict-search | -no-jre-restrict-search include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions with specified granularity -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions with specified granularity -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:<pathname>[=<options>] load native agent library by full pathname -javaagent:<jarpath>[=<options>] load Java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen with specified image


Any ideas?

share|improve this question

migrated from stackoverflow.com Mar 14 '13 at 20:15

This question came from our site for professional and enthusiast programmers.

2  
If you see this then it's already working. –  Roman C Mar 14 '13 at 19:20
2  
Not having installed a plugin in your browser really has nothing to do with java being installed on the machine. –  Brian Roach Mar 14 '13 at 19:22
    
Two things: 1. Do .jar files run? 2. Every browser has a plug-in that allows it to run java... better check your browser documentation on how to enable java –  Barranka Mar 14 '13 at 19:25
    
but the problem is everytime I click on "Install Plugin" it just takes me to java's website to download java again –  ThatBenderGuy Mar 14 '13 at 19:27
    
which is already installed on to my machine at /usr/java/jre1.7.0_17 –  ThatBenderGuy Mar 14 '13 at 19:30

2 Answers 2

You need the browser plugin.

System > Administration > Software Center

Search for IcedTea. Check if OpenJDK is already installed while you are on it.

Install icedtea6-plugin. Go to about:plugins on your browser and enable it if it's not automatically enabled. Once you're done the software center window should look somehting like this:

enter image description here

You can do it via terminal too, check the package names above.

Edit: If you have Sun's java installed, make sure you enable the correct plugin on your browser, that is IcedTea for OpenJDK. I don't recommend having both Sun's Java and OpenJDK installed since you might have conflicts between both.

share|improve this answer

In Terminal

Chrome
sudo -s mkdir -p /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
ln -s /usr/local/java/jre1.7.0/lib/amd64/libnpjp2.so

/usr/local/java/jre1.7.0 should be replaced with your location of jre

Firefox
sudo -s
mkdir -p /usr/lib/mozilla/plugins
cd /usr/lib/mozilla/plugins
ln -s /usr/local/java/jre1.7.0/lib/amd64/libnpjp2.so

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.