LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-28-2010, 05:30 AM   #1
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 490

Rep: Reputation: 35
Slackware64 13.1 packages JRE and JDK conflict?


Hi, the packages jre and jdk conflict with each other, to install jdk I should remove jre?
 
Old 08-28-2010, 07:19 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,785
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
I've got both installed on my machine with no problems.
 
Old 08-28-2010, 07:42 AM   #3
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware 13.37 and 13.1
Posts: 393

Rep: Reputation: 63
I've never experienced a conflict between jre and jdk and I've been using them in all versions since 11.

I did experience a problem with netbeans 6.x that once may be think something like that was happening, but it turned out to be a netbeans problem.
 
Old 08-28-2010, 12:25 PM   #4
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 214

Rep: Reputation: 64
Quote:
Originally Posted by mlpa View Post
Hi, the packages jre and jdk conflict with each other, to install jdk I should remove jre?
Yes, you're correct.
JRE (runtime environment) is included in the JDK (development kit).
You should uninstall one before installing the other.
 
Old 08-09-2011, 08:16 PM   #5
JWilliamCupp
Member
 
Registered: Jul 2005
Location: Indiana, U.S.A.
Distribution: Fedora
Posts: 32

Rep: Reputation: 15
JRE / JDK Conflict for Opera

I use the Opera web browser. Removing JRE removes the folder /usr/java/jre1.6.0_26 and thus, Opera cannot use Java any longer. As explained on the Opera plugins page, Opera does not use the JRE plugin but invokes the binary file directly. Opera says to "locate libnpjp2.so" and point the plugins directory there to find the Java plugin.

However, after I removed the JRE and installed JDK, "locate libnpjp2.so" came up empty.

What I had to do was make a copy of /usr/java/jre1.6.0_26 elsewhere, remove JRE, and install JDK, then replace the jre1.6.0_26 folder at /usr/java/jre1.6.0_26 in order to have both JDK installed and Opera capable of running Java content.

- Bill
 
Old 08-09-2011, 09:24 PM   #6
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,180
Blog Entries: 15

Rep: Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823
JDE and JRE should not conflict with each other. One is a runtime kit and the other is the software developers kit. You can actually have both on a system without penalty.

Java using applications like Web Browsers usually use a symbolic linked file and not the actual binary. If they aren't, then the authors probably have them built incorrectly.
 
Old 08-09-2011, 10:05 PM   #7
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 390

Rep: Reputation: 151Reputation: 151
I was curious about this issue so I compared the listings from both JRE and JDK packages to see if there are duplicated files.

Problem is, I don't have Slackware64 13.1 handy, only Slackware64 13.37, but the procedure should be the same. This is what I did:


Code:
$ tar -tvf jre-6u25-x86_64-1.txz | awk '{print $6}' > jre.files
$ tar -tvf jdk-6u25-x86_64-1.txz | awk '{print $6}' > jdk.files
$ comm -1 -2 <(sort jdk.files) <(sort jre.files)
There are a few files present in both packages. This is the result of the comm command:

Code:
./
etc/
etc/profile.d/
install/
install/doinst.sh
install/slack-desc
usr/
usr/lib64/
usr/lib64/java/
usr/lib64/java/COPYRIGHT
usr/lib64/java/LICENSE
usr/lib64/java/THIRDPARTYLICENSEREADME.txt
usr/lib64/java/bin/
usr/lib64/java/bin/java
usr/lib64/java/bin/javaws
usr/lib64/java/bin/jcontrol
usr/lib64/java/bin/keytool
usr/lib64/java/bin/orbd
usr/lib64/java/bin/pack200
usr/lib64/java/bin/policytool
usr/lib64/java/bin/rmid
usr/lib64/java/bin/rmiregistry
usr/lib64/java/bin/servertool
usr/lib64/java/bin/tnameserv
usr/lib64/java/bin/unpack200
usr/lib64/java/lib/
usr/lib64/java/lib/jexec
usr/lib64/java/man/
usr/lib64/java/man/ja_JP.eucJP/
usr/lib64/java/man/ja_JP.eucJP/man1/
usr/lib64/java/man/ja_JP.eucJP/man1/java.1
usr/lib64/java/man/ja_JP.eucJP/man1/keytool.1
usr/lib64/java/man/ja_JP.eucJP/man1/orbd.1
usr/lib64/java/man/ja_JP.eucJP/man1/pack200.1
usr/lib64/java/man/ja_JP.eucJP/man1/policytool.1
usr/lib64/java/man/ja_JP.eucJP/man1/rmid.1
usr/lib64/java/man/ja_JP.eucJP/man1/rmiregistry.1
usr/lib64/java/man/ja_JP.eucJP/man1/servertool.1
usr/lib64/java/man/ja_JP.eucJP/man1/tnameserv.1
usr/lib64/java/man/ja_JP.eucJP/man1/unpack200.1
usr/lib64/java/man/man1/
usr/lib64/java/man/man1/java.1
usr/lib64/java/man/man1/keytool.1
usr/lib64/java/man/man1/orbd.1
usr/lib64/java/man/man1/pack200.1
usr/lib64/java/man/man1/policytool.1
usr/lib64/java/man/man1/rmid.1
usr/lib64/java/man/man1/rmiregistry.1
usr/lib64/java/man/man1/servertool.1
usr/lib64/java/man/man1/tnameserv.1
usr/lib64/java/man/man1/unpack200.1
usr/lib64/mozilla/
usr/lib64/mozilla/plugins/
usr/share/
usr/share/applications/
usr/share/applications/sun-java.desktop
usr/share/applications/sun-javaws.desktop
usr/share/applications/sun_java.desktop
usr/share/icons/
usr/share/icons/hicolor/
usr/share/icons/hicolor/16x16/
usr/share/icons/hicolor/16x16/apps/
usr/share/icons/hicolor/16x16/apps/sun-java.png
usr/share/icons/hicolor/16x16/apps/sun-javaws.png
usr/share/icons/hicolor/16x16/apps/sun-jcontrol.png
usr/share/icons/hicolor/16x16/mimetypes/
usr/share/icons/hicolor/16x16/mimetypes/gnome-mime-application-x-java-archive.png
usr/share/icons/hicolor/16x16/mimetypes/gnome-mime-application-x-java-jnlp-file.png
usr/share/icons/hicolor/16x16/mimetypes/gnome-mime-text-x-java.png
usr/share/icons/hicolor/48x48/
usr/share/icons/hicolor/48x48/apps/
usr/share/icons/hicolor/48x48/apps/sun-java.png
usr/share/icons/hicolor/48x48/apps/sun-javaws.png
usr/share/icons/hicolor/48x48/apps/sun-jcontrol.png
usr/share/icons/hicolor/48x48/mimetypes/
usr/share/icons/hicolor/48x48/mimetypes/gnome-mime-application-x-java-archive.png
usr/share/icons/hicolor/48x48/mimetypes/gnome-mime-application-x-java-jnlp-file.png
usr/share/icons/hicolor/48x48/mimetypes/gnome-mime-text-x-java.png
usr/share/mime/
usr/share/mime/packages/
usr/share/mime/packages/x-java-archive.xml
usr/share/mime/packages/x-java-jnlp-file.xml
 
Old 08-09-2011, 11:12 PM   #8
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,180
Blog Entries: 15

Rep: Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823
The JDE files do overwrite the JRE files, but they are the same exact files in essence minus a few JRE specific ones used by various programs. In reality JRE and JDE both are subsets of the entire Java package. One is geared for software development and the other for general usage, but they can co-exist.
 
Old 08-09-2011, 11:46 PM   #9
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 390

Rep: Reputation: 151Reputation: 151
Yes, they can co-exist. But, rephrasing the OP's question, is it correct to affirm that if JDK is installed, then JRE is not needed?
 
Old 08-10-2011, 12:03 AM   #10
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,180
Blog Entries: 15

Rep: Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823Reputation: 823
You still need JRE for Java applications. The JDE only provides basically what any other developer package has like headers, libraries, code samples, documentation, and a basic runtime(s). The JRE is what provides the shared libraries for the system and all other applications that are required for Java using applications to work correctly.

So yes, JRE regardless is still required.
 
Old 08-10-2011, 02:32 AM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,755

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
And the 'conflicting' files are no problem, either. Many Slackware packages contains duplicates -like glibc-solibs and glibc, and aaa_elflibs contains duplicates of many packages.
 
Old 08-10-2011, 03:10 AM   #12
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
Quote:
Originally Posted by ReaperX7 View Post
You still need JRE for Java applications. The JDE only provides basically what any other developer package has like headers, libraries, code samples, documentation, and a basic runtime(s). The JRE is what provides the shared libraries for the system and all other applications that are required for Java using applications to work correctly.

So yes, JRE regardless is still required.
Specifically, what can't a person run with the JDK package that they would need the JRE package for? My understanding is that the Slackware JDK package from extra/ is meant to fully replace the JRE package. The JDK package contains a /usr/lib(64)/java/jre/ directory with what should be a full implementation of the JRE. Granted I don't have much exposure to Java, the programs I have run work just fine with the JDK package installed in place of the JRE package.
 
Old 08-10-2011, 04:18 AM   #13
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 13.1, slackware 13.1
Posts: 369

Rep: Reputation: 45
I once had a problem when compiling a java program. I believe it was the maven framework that gave the problems.

Thing is, the JDK does include the runtime. But it is located in a different directory. If you have both the JRE and the JDK, the JRE will be preferred by programs before the JDK's runtime.

Since maven looks for the JDK in a directory relative to the runtime, that gave me problems. Uninstalling the JRE solved the thing. Never had any problems since then.

Quote:
Originally Posted by JWilliamCupp View Post
I use the Opera web browser. Removing JRE removes the folder /usr/java/jre1.6.0_26 and thus, Opera cannot use Java any longer. As explained on the Opera plugins page, Opera does not use the JRE plugin but invokes the binary file directly. Opera says to "locate libnpjp2.so" and point the plugins directory there to find the Java plugin.

However, after I removed the JRE and installed JDK, "locate libnpjp2.so" came up empty.

What I had to do was make a copy of /usr/java/jre1.6.0_26 elsewhere, remove JRE, and install JDK, then replace the jre1.6.0_26 folder at /usr/java/jre1.6.0_26 in order to have both JDK installed and Opera capable of running Java content.

- Bill
locate is an utillity that looks for files in an index. This index is updated every night by a cron job (somewhere around 4 in the morning). locate doesn't look directly at the file system, so changes that were made since the last index update will not be reflected.

Try this to find the library:
Code:
find /usr/ -name libnpjp2.so
The difference with locate is that find will look directly at the file system. This means it takes longer to run, but it also works for things that changed recently.
 
Old 08-10-2011, 04:29 AM   #14
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 390

Rep: Reputation: 151Reputation: 151
Quote:
Originally Posted by Mike_M View Post
My understanding is that the Slackware JDK package from extra/ is meant to fully replace the JRE package. The JDK package contains a /usr/lib(64)/java/jre/ directory with what should be a full implementation of the JRE.
That was my understanding as well. The difference is that JDK installs libraries to /usr/lib(64)/java/jre/lib and JRE installs to /usr/lib(64)/java/lib. After comparing both directories it seems to me the JDK contains all libraries installed by the JRE.
 
Old 08-10-2011, 05:48 AM   #15
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 13.1, slackware 13.1
Posts: 369

Rep: Reputation: 45
It is simple.
Quote:
Originally Posted by jdk-6u20-x86_64-1 slack-desc
This package contains everything you need to run Java(TM).
If you install the JDK, you don't need the JRE, the JDK contains everything you need to run Java programs.

Quote:
Originally Posted by JWilliamCupp View Post
What I had to do was make a copy of /usr/java/jre1.6.0_26 elsewhere, remove JRE, and install JDK, then replace the jre1.6.0_26 folder at /usr/java/jre1.6.0_26 in order to have both JDK installed and Opera capable of running Java content.
No you had not. Granted, it worked, but it wasn't necessary.
You should have pointed Opera to the file in the JDK, it is there, see my previous post in this thread for an explanation why you didn't find it.

Last edited by janhe; 08-10-2011 at 05:50 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
It can't see JDK (Slackware64 13) portia Slackware 4 01-29-2010 03:08 AM
Please help me install latest JDK & JRE on my CentOS server xNuManx Linux - General 5 10-04-2008 04:49 AM
How to install a very specific subversion of Java (JDK/JRE) rose_bud4201 Linux - Software 2 06-16-2008 09:45 AM
Help installing JDK JRE SuSE CS_Student_DrewU Linux - General 2 11-09-2007 08:33 PM
How do I Uninstall Firefox, Jre, jdk, Mozilla TSynergy Linux - Newbie 2 11-18-2004 05:35 PM


All times are GMT -5. The time now is 04:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration