You are not logged in.
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
/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.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
JDK8 isn't in the repos, Inxsible.
Offline
crap.... I meant the AUR. Disregard my ramblings about pacman in the previous post.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
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
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
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
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
@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
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...
Offline
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
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
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