Directory for installing Java Development Kit

Archived topics about LMDE 1 and LMDE 2
Locked
Dozo

Directory for installing Java Development Kit

Post by Dozo »

I am trying to install the newest JDK 7 on linux mint debian and have no idea what directory to install the files in. I am not doing the install manually, I'm using the installer that comes with the JDK w/ Netbeans download. Once I start the installer it asks where I want to install the files and I'm getting conflicting answers on where I should put it (either the /usr/lib , usr/bin , usr/local , opt etc..). Even if I just randomly pick one of these directories, it won't let me, stating "The specified installation folder is read-only." So where exactly should I put the files? Thanks for the help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Zalbor

Re: Directory for installing Java Development Kit

Post by Zalbor »

Are you running the installer as root?
I don't know a lot about LMDE but in "regular" mint you should add "sudo" in the command line before the installer. If sudo doesn't work in LMDE I think the proper way is to change to root by "su" and then run the installer.
mockturtl

Re: Directory for installing Java Development Kit

Post by mockturtl »

Dozo wrote:I am trying to install the newest JDK 7 on linux mint debian and have no idea what directory to install the files in. I am not doing the install manually, I'm using the installer that comes with the JDK w/ Netbeans download. Once I start the installer it asks where I want to install the files and I'm getting conflicting answers on where I should put it (either the /usr/lib , usr/bin , usr/local , opt etc..). Even if I just randomly pick one of these directories, it won't let me, stating "The specified installation folder is read-only." So where exactly should I put the files? Thanks for the help!
Netbeans has a debian package. You can install it from the Software Manager, or

Code: Select all

$ apt install netbeans
You'll end up with lots of symlinks: executables in /usr/bin/java, jars in /usr/share/java.

In general, /usr is system-managed; changes you make can be overwritten during an upgrade.

Note the java implementation in the Debain repos (OpenJDK) is not the official (Oracle, formerly Sun) JDK. Instructions for getting / upgrading it here.
Dozo

Re: Directory for installing Java Development Kit

Post by Dozo »

OK as per usual this turned out to be something really simple. Zalbor you hit it, I restarted the installer as root, and voila, the default directory was usr/local. With linux it seems every time I get frustrated with something not working it always ends up being something simple! Now I just gotta quit going back to windows every time I hit an issue and stick with it! Thanks all for the help :)
millpond
Level 3
Level 3
Posts: 178
Joined: Tue Jan 31, 2012 6:34 pm

Re: Directory for installing Java Development Kit

Post by millpond »

I have my JDK7 installed to /usr/local/jdk7 - it was installed from the Oracle site package.

However, the system doesnt seem to see it, and the system Java is still 1.6.0.24
Keep in mind that I am not a java programmer, and may have overlooked MANY subtleties!!!

Any idea on how to *integrate* it into Debian now that Oracle is not apparently actively supporting Debian updates. (At least from what I have seen).
Locked

Return to “LMDE Archive”