• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

how to install Java in Linux?

Red Squirrel

No Lifer
I'm trying to figure out how to do this, and I'm not finding much online. Everything is telling me to just extract a tar.gz file. That' snot installing, that's just extracting. I want to actually install it, so that anything that requires java will work, such as Minecraft. Right now if I open the .jar file I just get a directory listing because the system does not know what to do with it. Grasping at straws, I went open with and pointed it to the java binary file but that did not work, I'm sure there's more to it than that. In fact when I try to execute that binary directly it just says it can't be found. Guessing it needs to be compiled in some way, but there's no configure file or anything.
 
Does your distribution not have a package for it? I haven't installed the Java(tm) JVM since Oracle took over, but in the past you just downloaded a binary file, made it executable and then ran it.

It would install Java into a folder under /opt by default.
 
I did a search in the software centre and did not find it. I think there sometimes is a Java package but not sure if it's the Oracle one. I forget what it's called but the one you can get is 3rd party if I recall. Minecraft specifically wants the oracle one.

The one I got is from Oracle but it's just a bunch of files, there's no assosicates or anything made within the system. I can't even execute the file directly, even though it's right there, it says it can't be found.

Code:
root@falcon:/usr/java/jre1.7.0_40/bin# dir
total 412
  0 lrwxrwxrwx 1 root root      8 Sep 18 18:55 ControlPanel -> jcontrol
  8 -rwxr-xr-x 1 root root   5746 Sep 18 18:55 java
 16 -rwxr-xr-x 1 root root  16246 Sep 18 18:55 java_vm
104 -rwxr-xr-x 1 root root 104202 Sep 18 18:55 javaws
  8 -rwxr-xr-x 1 root root   6391 Sep 18 18:55 jcontrol
  8 -rwxr-xr-x 1 root root   5905 Sep 18 18:55 keytool
  8 -rwxr-xr-x 1 root root   6045 Sep 18 18:55 orbd
  8 -rwxr-xr-x 1 root root   5925 Sep 18 18:55 pack200
  8 -rwxr-xr-x 1 root root   6013 Sep 18 18:55 policytool
  8 -rwxr-xr-x 1 root root   5897 Sep 18 18:55 rmid
  8 -rwxr-xr-x 1 root root   5909 Sep 18 18:55 rmiregistry
  8 -rwxr-xr-x 1 root root   5925 Sep 18 18:55 servertool
  8 -rwxr-xr-x 1 root root   6077 Sep 18 18:55 tnameserv
212 -rwxr-xr-x 1 root root 215415 Sep 18 18:55 unpack200
root@falcon:/usr/java/jre1.7.0_40/bin# ./java
-su: ./java: No such file or directory
root@falcon:/usr/java/jre1.7.0_40/bin#
 
Openjdk should definitely be in the repos, and is the recommended version to install. Proprietary Java may be there also, but if not, I'd be surprised if it wasn't available in deb and rpm packages.

Edit:
Minecraft only supports proprietary Java, or it only works with it? There's a difference.
 
Their site says to use the proprietary one, so I'm not sure. I suppose I can try the openjdk one though. Only thing, I also plan to eventually use Proxmox for my VM server, and it uses a Java based console. Do you think something like that would work in openjdk? I know the remote console for the IPMI on my supermicro server does not work.

Actuallly does not seem like there's openjdk in kubuntu, unless it's called something else. It's not showing up. I do get openoffice when I search for it, which is odd. does Open Office use JDK? Because I have it, and it does work. So maybe I already have JDK.
 
Last edited:
Their site says to use the proprietary one, so I'm not sure. I suppose I can try the openjdk one though. Only thing, I also plan to eventually use Proxmox for my VM server, and it uses a Java based console. Do you think something like that would work in openjdk? I know the remote console for the IPMI on my supermicro server does not work.

Dunno. I don't use much Java, but I've never had an issue with openjdk. Last thing I used was the Android sdk which specified the proprietary version, but the libre one worked fine.

Edit:
openjdk-7-jre and java-common seem to be the main packages in Debian. I'd expect Kubuntu used similar names.
 
Last edited:
Think I got it. For some reason it was not showing up in the software centre but I was able to install it through apt-get. Now I just need to figure out how to assosiate .jar files with it. I can open using the right click menu but not sure how to do it permanently as if I click to get the box it does not show up in the list or in search.

Edit: Wow minecraft really is crazy on video card requirements. Runs like crap on my new (to me) R7870.
 
Last edited:
Hmm now that you mention it I think that may be what I ended up doing last time.

Though, I'll have to figure out my video card situation, seems this card can't run it. Though, so far I did not get any of the other issues I had before, but still early to tell I guess. If those issues do in fact go away then I can live with no minecraft if it means no more lockups and square artifacts all over the screen. 😉
 
Think I got it. For some reason it was not showing up in the software centre but I was able to install it through apt-get. Now I just need to figure out how to assosiate .jar files with it. I can open using the right click menu but not sure how to do it permanently as if I click to get the box it does not show up in the list or in search.

Edit: Wow minecraft really is crazy on video card requirements. Runs like crap on my new (to me) R7870.

Your video card is more than good enough. I run Minecraft on my Mint 14 installation with a 5770 and it's smooth as butter. Make sure you have all of the proper Java flags set when launching the program. Also, installing the Catalyst drivers as mentioned above will probably help as well.
 
It magically started working, I also had the "AMD unsupported hardware" watermark, but I googled it and had to download a file and copy it somewhere... I forget now exactly what I did but it worked. Minecraft was still choppy while even more intensive games were fine, but after a few reboots minecraft is ok too.
 
Back
Top