You are not logged in.

#1 2014-04-15 18:52:30

FenrirAB
Member
Registered: 2014-04-15
Posts: 40

[SOLVED][GNOME] where should i manually install JDK8?

i downloaded Oracle Java JDK8 because i need it for coding in school... the thing is i havent really mess with the filesystem much so... i was wondering where should i install the program? where in root directory should i install it?

Last edited by FenrirAB (2014-04-18 01:25:31)


Then she sighed and squealed and kicked the air,
She sang: my bear so fair and off they went,
The bear, the bear and the maiden fair

Offline

#2 2014-04-15 18:56:23

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED][GNOME] where should i manually install JDK8?

/opt. If you use the official package, it installs it in /opt. Any reason why you want to use an external package instead of the one available in the repo ? Externally installed packages are not maintained by pacman.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2014-04-15 18:58:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,594

Re: [SOLVED][GNOME] where should i manually install JDK8?

JDK8 isn't in the repos, Inxsible.

Offline

#4 2014-04-15 20:42:26

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED][GNOME] where should i manually install JDK8?

crap.... I meant the AUR. Disregard my ramblings about pacman in the previous post.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2014-04-16 20:26:37

FenrirAB
Member
Registered: 2014-04-15
Posts: 40

Re: [SOLVED][GNOME] where should i manually install JDK8?

ok i manage it install it on the root /opt... fairly easy enough... but when i go to terminal and type "java -version" its still using the openJDK7 instead of the Oracle JDK8... anyway you can direct me to a link that would show how to link the JDK8 to the system?

THANKS IN ADVANCE ^_^


Then she sighed and squealed and kicked the air,
She sang: my bear so fair and off they went,
The bear, the bear and the maiden fair

Offline

#6 2014-04-17 18:09:13

FenrirAB
Member
Registered: 2014-04-15
Posts: 40

Re: [SOLVED][GNOME] where should i manually install JDK8?

I was able to restore openJDK7 back to my computer.

before it was giving me a bash error stating that "bash java: command not found"

now i have it back...

I've also deleted the Oracle Java JDK 8 that i downloaded from Oracle itself.... by removing it in the /opt as was suggested to install it there
all thanks to @x33a for providing me an AUR link for JDK8:

https://aur.archlinux.org/packages/jdk

i installed this package by using:

cd Builds
tar -xzvf jdk.tar.gz
cd jdk
sudo makepkg -s --asroot
[password]
then the installation begins
but when i type java -version
its still giving me the openJDK7..

anyway to solve this?

think it has something to do with $PATH... but i have no idea how to work that...


heres a screenshot:
http://i.imgur.com/mFOjRsL.png



-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --


Then she sighed and squealed and kicked the air,
She sang: my bear so fair and off they went,
The bear, the bear and the maiden fair

Offline

#7 2014-04-17 20:45:48

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED][GNOME] where should i manually install JDK8?

you must add your /opt/java location to your $PATH variable at the head so that it will override the openjdk one. Secondly, why do you need both versions ? If school work requires you to use Oracle jdk, just use that. In any case that's the one that will be used if you depend only on the PATH variable. unless you specifically ask programs to use openjdk by providing the openjdk path, its going to use the Oracle one from the $PATH


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2014-04-17 22:34:09

FenrirAB
Member
Registered: 2014-04-15
Posts: 40

Re: [SOLVED][GNOME] where should i manually install JDK8?

@Inxsible

Thanks for the quick reply...

heres what i got when i printenv:

[fenrirab@thegrid ~]$ printenv

ANDROID_HOME=/opt/android-sdk
ANDROID_SWT=/usr/share/java
JAVA_HOME=/usr/lib/jvm/java-7-openjdk <-- yup i know this is the one

i know you're about ready to table flip... but it shames me to tell you that after reading https://wiki.archlinux.org/index.php/En … _variables

i still dont know how to edit the Enviroment variable to exchange JAVA_HOME=/usr/lib/jvm/java-7-openjdk    to    /usr/lib/jdk1.8.0_05

do i just sudo gedit $PATH ?

[EDIT]
Also, someone in the forum mention that i dont have to uninstall openJDK7 but just redirecting the $PATH to jdk8 (and if i read correctly then the $PATH of jdk is JAVA_HOME)

Last edited by FenrirAB (2014-04-17 22:42:25)


Then she sighed and squealed and kicked the air,
She sang: my bear so fair and off they went,
The bear, the bear and the maiden fair

Offline

#9 2014-04-17 22:54:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED][GNOME] where should i manually install JDK8?

You define your environment variables in the initialization file for your login shell: most likely .profile or .bash_profile, depending on your setup. Something like:

export JAVA_HOME="/usr/lib/jdk1.8.0_05"

Assuming that Gnome respects those files; which may or may not be the case...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2014-04-18 00:19:40

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED][GNOME] where should i manually install JDK8?

you might also need to set PATH

export PATH=/opt/java:$PATH

This will set your java path ahead of the openjdk one in case you havent uninstalled it


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#11 2014-04-18 01:25:08

FenrirAB
Member
Registered: 2014-04-15
Posts: 40

Re: [SOLVED][GNOME] where should i manually install JDK8?

thanks @Inxsible and @jasonwryan

that did the trick... i would mark it as solve now.


Then she sighed and squealed and kicked the air,
She sang: my bear so fair and off they went,
The bear, the bear and the maiden fair

Offline

Board footer

Powered by FluxBB