Questions tagged [java]

Java is a programming language originally developed by Sun Microsystems. Questions here should be about the installation, configuration and troubleshooting a JVM (Java Virtual Machine) or a JRE (Java Runtime Environment).

Programming questions (unless directly related to Ubuntu) should be asked on StackOverflow.com.

Java is a programming language originally developed by Sun Microsystems. Questions here should be about the installation, configuration and troubleshooting a JVM (Java Virtual Machine) or a JRE (Java Runtime Environment).

Programming questions (unless directly related to Ubuntu) should be asked on Stack Overflow.

3203 questions
392
votes
4 answers

How to set JAVA_HOME for Java?

I've installed a version of Java. How can we set the $JAVA_HOME environment variable correctly?
161
votes
4 answers

update-java-alternatives vs update-alternatives --config java

On Ubuntu 12.04 LTS I have installed Sun's JDK7, Eclipse, and the Arduino IDE. I want the Arduino to use OpenJDK 6 and want Eclipse to use Sun's JDK 7. From my understanding I need to manually choose which Java to use before running each…
Stan Smith
  • 1,713
  • 2
  • 11
  • 7
104
votes
7 answers

Installing Java Automatically (With Silent Option)

I'm trying to install Java through apt-get. I found this PPA of Java Installers, however, when I add the repository, update and then issue the apt-get install -y command, the installer for java takes over and it pops up a configuration option. I'm…
Layke
  • 1,379
49
votes
10 answers

How to correctly remove OpenJDK/OpenJRE and set SunJDK/SunJRE as Default

Ubuntu seems to favour OpenJDK/JRE very much over Sun JDK/JRE. Even after I installed Sun JRE, JDK and plugin and spent some time plucking out OpenJDK-related packages, apt-get has installed them back with some packages as a dependency. Can this…
Ivan
  • 57,065
39
votes
2 answers

"sha256sum mismatch jdk-7u3-linux-x64.tar.gz " error when trying to install Oracle Java

i recently tried installed java 7 on ubuntu 12.04 and i think i screwed something up I followed the instructions given here. First you need to remove openjdk for this run the following command from your terminal sudo apt-get purge openjdk* Now you…
Fawkes5
  • 2,509
  • 4
  • 25
  • 28
35
votes
1 answer

How to run a .jnlp file in ubuntu server

I am trying to run a .jnlp (java) file in Ubuntu Server. This file is BitCoin minter. When I try to run it, it says access is denied.
29
votes
6 answers

How can I view or start Java Web Start Applications?

Where can I find a menu or launchers for Javaws apps that I have installed? I am using OpenJDK x86.
11
votes
2 answers

How to associate jnlp file with javaws

My actual version of java is $ java -version java version "1.6.0_38" Java(TM) SE Runtime Environment (build 1.6.0_38-b05) Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode) and it possible to run jnlp file as $ javaws…
Betlista
  • 411
  • 2
  • 4
  • 11
10
votes
3 answers

How to install/use JUnit?

I have installed JUnit on my Ubuntu 11.04 sudo apt-get install junit Then created a test file like: import org.junit.*; public class TestBasicLinkedList { @Test public void testCanAdd(String[] args) { BasicLinkedList list = new…
Jiew Meng
  • 10,347
8
votes
6 answers

Java: Error while loading shared libraries: libjli.so

I tried installing openjdk6, openjdk7, oracle8... But always the same error when I want to execute java, for example with java -version: java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or…
Geiser
  • 282
  • 1
  • 2
  • 14
8
votes
5 answers

How do I configure Java security settings, etc?

I have installed JDK 7, but how do I configure settings like security, etc? On Windows, I can set up JDK 7 from Control Panel -> Java.
taymindis Woon
  • 1,463
  • 5
  • 16
  • 18
8
votes
5 answers

Unable to access jarfile

I'm trying to run a .jar file on the start up of my Linux machine (Ubuntu 12.04 server) My script works as long as I run it inside the directory which it is in. If I try to run it outside the directory I get the error "Cannot access jarfile…
7
votes
1 answer

java_home directory is not correct though it exists in my environment file

I'm using Java jdk with Maven and I have the following /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" # Maven Settings export JAVA_HOME=/usr/local/jdk1.6.25/ export…
David
  • 217
7
votes
4 answers

How to run ContestAppletProd.jnlp?

I am trying to access topcoder arena but facing a problem. I am following the procedure given in the following link - http://community.topcoder.com/tc?module=Static&d1=help&d2=getStarted Currently openjdk-7-jdk is installed on my computer. On…
Shravan40
  • 269
  • 2
  • 4
  • 15
7
votes
3 answers

"MOZILLA_FIVE_HOME not set" Zekr Qur'an study software java error

I installed Zekr Qur'an study software on Ubuntu 12.04 and I upgraded to 12.10. Then the Zekr app started giving me this error whenever I start it. org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)] at…
1
2 3
17 18