LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2015, 10:00 AM   #1
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 22

Rep: Reputation: Disabled
Question On purging OpenJDK and installing the Oracle JDK


Hello again!

I do not think that my question in its exact form has been answered on LQ just yet, but I may be wrong on that!

What I want to do is install the Oracle Java JDK on my Ubuntu Studio 14.04.2 workstation; however, the issue is that, along the way (possibly as a default) the OpenJDK was installed instead (with the IcedTea plugin).

So, my question is - if I were to PURGE the OpenJDK, and install the Oracle one instead, would this "break" anything on my system? I mean, if all of the standard environment vars. are set correctly to point to the "new" Java environment, would any packages "care" that it was no longer the OpenJDK? I am not talking about whether or not those packages which rely on Java would still "work" the same, because I'm pretty sure that that's a far tougher question to answer. I just don't want to break anything right off the bat (so to speak) simply because I changed JDK's.

I really want to use the Oracle JDK to insure that what I'm seeing is what I'm supposed to see (ie. that it's the same, because its the "proper" environment according to the instructions for the course I'm taking...; the course uses Oracle Java JDK 7U 80). But at the same time, I don't want to "break" anything, and then not realize that it has happened until I next run those affected app(s)! I realize that this may be a little difficult to answer without a complete listing of the packages installed on my system and such, but that list really isn't too long; ask about any package if need be, and I'll let you know!

Has anyone out there tried this? Any luck, or pure disaster?

In the end, I wish that the OpenJDK had never been installed, in the first place, because I wouldn't need to wonder / worry about this issue!!!

Any ideas / comments / assistance would be appreciated.

BTW, I have already considered wiping this Ubuntu installation, and then installing one with less "extra stuff", so that maybe NO JDK was present by default. However, asked and answered, because I simply LOVE Ubuntu Studio, and the current version is rock-solid so far...; sadly, I am sort of "stuck" on my distro :-{

ZTagr.
 
Old 07-20-2015, 01:16 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You might try installing Oracle JDK in an alternate location and set your Java variables to use that.

There is no requirement that Oracle use the default JDK (or even default version) on a system so you could continue to have OpenJDK as the default on the system and use only the Oracle JDK for the Oracle applications.

If you really want to remove OpenJDK I'd run lsof on the directory where it is installed to see if anything else is using it.
 
Old 07-20-2015, 07:32 PM   #3
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thanks for the reply, MensaWater!

I will give your suggestion(s) a try, because, given a choice, I would rather not purge / remove OpenJDK; I just don't want it to "get in the way" when I run, for example, "javac" or such..., it needs to be Oracle's version, so that any unexpected results obtained can't be "blamed" on using the wrong development kit (you know what I mean :-}

But I also don't fancy typing the entire path to the executable(s) because I'm trying to avoid one and run another with the same name (and quite possibly a similar result / output), thus obscuring the actual problem...(I know HOW to do this, I just don't really want to!). It would just be better with only ONE version of the "java" virtual machine, and one "javac" compiler, so that I could set the environment vars. just once, and then leave them alone!

Damn, this is such a pain...; oh well, guess I'll just have to muddle through!

Thanks again (I'm leaving this thread open / unresolved for a little while longer, so if anyone has any other suggestions, I'd be glad to hear them too!).

ZTagr.
 
Old 07-20-2015, 07:50 PM   #4
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
Oops - maybe I misunderstood?!

MensaWater, are you suggesting that I leave the OpenJDK "in place", install the Oracle JDK wherever I like, and then set all of the environment vars. to point to THAT JDK, instead of the "original"? That sounds GREAT, but doesn't answer my original question - will the USE of the Oracle JDK/ JRE "break" the package that it installed with (or, for that matter, ANY of the commonly installed apps for Ubuntu or Ubuntu Studio) that require Java presence?

That is to say, does anyone know of a specific situation where NOT using the OpenJDK package causes a program for Ubuntu to stop functioning correctly? That is what I actually mean when I say "break" the system or application(s)...

Because I was not responsible for the original installation of OpenJDK, I must assume that SOME PACKAGE I've installed WAS responsible for that; now, not knowing which app. that was, I would not be in a position to test that application to determine if it still runs correctly with the Oracle version! I might, somewhere down the road, try and run that application, only to find out THEN that it no longer functions correctly (and, even worse, I wouldn't even know WHY it no longer worked correctly :-{ ).

So you see what my dilemma is, and what I'm asking? Maybe it more accurately could be re-phrased "what package might have installed the OpenJDK, along with itself, when it was installed?", but I think you see why that version of the question is far more difficult to answer - it could literally be any one of thousands of applications that utilize Java in some way...

Anyways, if I misunderstood, I apologize...

Again, thanks!

ZTagr.
 
Old 07-20-2015, 08:27 PM   #5
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
Sorry for the trouble, MensaWater!

Like many noobs, I was only slightly (ha) "confused" by the letters "jdk"
in the name "OpenJDK"! I honestly assumed it was an ACTUAL JDK that was installed. But, a quick trip to http://openjdk.java.net explained that it was NOT an "actual" jdk, but merely the jre for OpenJDK (jeez, what a confusing name!). So that explains the lack of response when I typed "javac"; I merely thought that my environment wasn't configured properly or something!

So, I will NOT need to worry about "cross-contamination" (so to speak), having my request(s) to run javac be confused as to WHICH version of "javac" I'm looking for - this makes me happy! I can without problems install Oracle's JDK as if it were the ONLY JDK, because it really IS the only JDK!

Thank for your help!

ZTagr.
 
1 members found this post helpful.
Old 07-23-2015, 12:24 PM   #6
xuhdev
LQ Newbie
 
Registered: Jun 2015
Distribution: CentOS,Debian,Ubuntu
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by ZTagr View Post
Sorry for the trouble, MensaWater!

Like many noobs, I was only slightly (ha) "confused" by the letters "jdk"
in the name "OpenJDK"! I honestly assumed it was an ACTUAL JDK that was installed. But, a quick trip to http://openjdk.java.net explained that it was NOT an "actual" jdk, but merely the jre for OpenJDK (jeez, what a confusing name!). So that explains the lack of response when I typed "javac"; I merely thought that my environment wasn't configured properly or something!
I don't know how you saw OpenJDK as a JRE only, but you probably have only installed the jre component (on Debian/Ubuntu it's openjdk-7-jre). To use javac and such, install openjdk-7-jdk (on Debian/Ubuntu).
 
  


Reply

Tags
java, openjdk, ubuntu 14.04



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to install openjdk without oracle jdk? Altiris Slackware 4 06-14-2015 10:55 PM
[SOLVED] both openjdk and oracle jdk on debian Reprovo Linux - Newbie 1 12-01-2014 07:01 AM
[SOLVED] openjdk vs jdk what is the good? rubankumars Slackware 8 08-10-2014 02:54 AM
openjdk-6-jdk vs official JDK? davidstvz Debian 3 09-22-2010 02:06 PM
About openjdk-6-jdk satimis Programming 3 05-03-2010 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration