Unix Technical Forum

Java Runtime Problem.

This is a discussion on Java Runtime Problem. within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Slackware comes with java runtime installed by default right? I have it installed on my system, but a lot ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 09:11 AM
Jack Wang
 
Posts: n/a
Default Java Runtime Problem.

Slackware comes with java runtime installed by default right? I have it
installed on my system, but a lot of programs complain to me about not
finding java runtime environment. Limewire wouldn't install for me and I'm
unable to use java applets with firefox.

I think I'd have to create a symlink as I solved this problem before on a
Debian box, but I can't recall exactly what I did. Please, if you know
how, tell me how to fix this problem. Thx a lot!

here's my output for whereis java

bash-3.00$ whereis java
java: /usr/lib/java /usr/include/java /usr/share/java

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 09:11 AM
Miguel De Anda
 
Posts: n/a
Default Re: Java Runtime Problem.

Jack Wang wrote:
> here's my output for whereis java
>
> bash-3.00$ whereis java
> java: /usr/lib/java /usr/include/java /usr/share/java
>


You should try `which java` instead as it will tell you which java will
get executed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 09:11 AM
Eef Hartman
 
Posts: n/a
Default Re: Java Runtime Problem.

Jack Wang <wk1989@m-net.arbornet.org> wrote:
> I think I'd have to create a symlink as I solved this problem before on a
> Debian box, but I can't recall exactly what I did. Please, if you know
> how, tell me how to fix this problem. Thx a lot!


Look at this:
lrwxrwxrwx 1 root root 34 May 13 03:32 libflashplayer.so -> /opt/flash_linux/libflashplayer.so
lrwxrwxrwx 1 root root 57 May 13 03:32 libjavaplugin_oji.so -> /opt/jdk1.5.0_03/jre/plugin/i386/ns7/libjavaplugin_oji.so
-rwxr-xr-x 1 root root 18840 May 11 14:17 libnullplugin.so
lrwxrwxrwx 1 root root 34 May 13 03:32 nphelix.so -> /opt/RealPlayer/mozilla/nphelix.so
lrwxrwxrwx 1 root root 41 May 13 03:32 nppdf.so -> /opt/Acrobat7/Browser/intellinux/nppdf.so
lrwxrwxrwx 1 root root 33 May 13 03:32 plugger.so -> /opt/plugger-5.1.2/lib/plugger.so
(in the "firefox/plugins" directory).

Of course, your pathnames will be different.

And don't forget that the links to the xpt files (for flash, realplayer
etc.) now go into the "firefox/components" directory:
lrwxrwxrwx 1 root root 32 May 13 03:32 flashplayer.xpt -> /opt/flash_linux/flashplayer.xpt
lrwxrwxrwx 1 root root 35 May 13 03:32 nphelix.xpt -> /opt/RealPlayer/mozilla/nphelix.xpt

As we're using both Mozilla as well as Firefox, we've put all plugins
into "their own directory" and use a script to recreate all the links
everytime we install an updated browser version.

PS: RealPlayer has to be the 10 version, RealPlayer-8 doesn't work
with Firefox or other "gcc-3.x compiled" browsers anymore.
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 09:11 AM
Laurent
 
Posts: n/a
Default Re: Java Runtime Problem.

On Wed, 08 Jun 2005 21:35:38 +0000, Jack Wang wrote:

Hello
> Slackware comes with java runtime installed by default right?

Yes Salckware 10.0 -> j2sdk 1.4.2

> Limewire wouldn't install for me and I'm
> unable to use java applets with firefox.

To use java applets you just need JRE (not full SDK). The link needed is
explained on :
http://www.mozilla.org/releases/mozi...ml#extras_java

> I think I'd have to create a symlink as I solved this problem before on a
> Debian box, but I can't recall exactly what I did. Please, if you know
> how, tell me how to fix this problem. Thx a lot!

I suggest first you remove sdk1.4.2 and download sdk1.5.0 from
java.sun.com.
Once installed (eg /usr/local/jdk1.5.0_03 you have to manually create
symlinks to executables as you request :

#cd /usr/local/bin
#ln -s /usr/local/jdk1.5.0_03/bin/* .

this should solve your problem.
PS : Don't forget to check the users permissions !

> bash-3.00$ whereis java
> java: /usr/lib/java /usr/include/java /usr/share/java

Use which as Michel told you ! and you should see java in /usr/local/bin !

Good luck
Laurent
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 09:11 AM
Thomas Ronayne
 
Posts: n/a
Default Re: Java Runtime Problem.

Jack Wang wrote:

>Slackware comes with java runtime installed by default right? I have it
>installed on my system, but a lot of programs complain to me about not
>finding java runtime environment. Limewire wouldn't install for me and I'm
>unable to use java applets with firefox.
>
>I think I'd have to create a symlink as I solved this problem before on a
>Debian box, but I can't recall exactly what I did. Please, if you know
>how, tell me how to fix this problem. Thx a lot!
>
>here's my output for whereis java
>
>bash-3.00$ whereis java
>java: /usr/lib/java /usr/include/java /usr/share/java
>
>
>

You didn't say which release of Slackware you're using, but assuming
you're using 10.1, yes, Java runtime is installed by default. The
symbolic link you need for Firefox (and Mozilla and Netscape) is easy to
find.

Let's say you've got Firefox installed in /usr/local/firefox (do this
logged in as root, with X running):

cd /usr/local/firefox/plugins
find /usr/lib/java -follow -name 'libjavaplugin*' -print

You need to use -follow because /usr/lib/java is a symbolic link to the
actual directory. The above will show you something like this:

/usr/lib/java/jre/lib/i386/libjavaplugin_nscp.so
/usr/lib/java/jre/lib/i386/libjavaplugin_nscp_gcc29.so
/usr/lib/java/jre/lib/i386/libjavaplugin_jni.so
/usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so
/usr/lib/java/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so

The one you want is /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so.

All you do, in /usr/local/firefox/plugins, is

ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so .

The Mozilla and Netscape installations already have that link.

While you're logged in as root, be sure to start Firefox after you've
created this link (it gets registered). You can see that you've done it
properly by entering "about:lugins" (without the quotes) in the
address window in Firefox.

Note that the default Java installation is the runtime; if you need the
development (complier) version, it's in the extra directory on Disk 3 of
your Slackware distribution disks. You may want to just install the
development version in case something you're using needs the compiler
(and it's easy) -- Firefox, Mozilla and Netscape do not require the
development package.

I remove the Java runtime package and install the development package
like this (note that the runtime is part of the development package and
is installed along with the development package, so don't worry about
breaking something):

cd /var/log/packages
removepkg jre*
(insert disk 3)
mount /dev/cdrom
cd /mnt/cdrom/extra/j2sdk*
installpkg j2sdk*.tgz
cd
eject

Once you've done that, you'll need to do the link in the plugins
directories:

cd /usr/local/firefox/plugins
rm libjava*
ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so .

And repeat that for Mozilla and Netscape.

No, you don't have to type that stuff -- use find and copy-paste the
name of libjavaplugin.

Hope this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 09:11 AM
Eef Hartman
 
Posts: n/a
Default Re: Java Runtime Problem.

Thomas Ronayne <trona@removethisameritech.net> wrote:
> The Mozilla and Netscape installations already have that link.


Actually, the mozilla-plugins-<whatever> package installs those links
(for mozilla, don't know about netscape), so if you install ONLY
mozilla but not its -plugins- package, you won't have them.
Here's from the 10.1 (mozilla 1.7.8, out of the patches tree) package
the complete install script (install/doinst.sh):
( cd usr/lib/mozilla-1.7.8/plugins ; rm -rf libjavaplugin_oji.so )
( cd usr/lib/mozilla-1.7.8/plugins ; ln -sf /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so )
( cd usr/lib/mozilla-1.7.8/plugins ; rm -rf libflashplayer.so )
( cd usr/lib/mozilla-1.7.8/plugins ; ln -sf /usr/lib/netscape/plugins/libflashplayer.so libflashplayer.so )

So what you see is that you only get "flashplayer" support in mozilla
if you also installed the netscape package (and - of course - for java
you will need either the jre (Java runtime environment) or the complete
j2sdk (Java development kit, is under extra, I believe) package).

> I remove the Java runtime package and install the development package
> like this (note that the runtime is part of the development package and
> is installed along with the development package, so don't worry about
> breaking something):


You can actually install both (jre first and then j2sdk), then even if
later you decide to remove the j2sdk again, the runtime will stay (those
files are in both packages then, so will not get removed).

The same is true, by the way, of the <something>-solibs- and the corre-
sponding FULL packages (glibc, openssl), although here the solibs one is
NOT a pure subset of the full one (the solibs shared libraries have been
stripped, the full development package still contains full debugging info
in their versions of the shared objects).
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 09:11 AM
Thomas Ronayne
 
Posts: n/a
Default Re: Java Runtime Problem.

Eef Hartman wrote:

>Thomas Ronayne <trona@removethisameritech.net> wrote:
>
>
>>The Mozilla and Netscape installations already have that link.
>>
>>

>
>Actually, the mozilla-plugins-<whatever> package installs those links
>(for mozilla, don't know about netscape), so if you install ONLY
>mozilla but not its -plugins- package, you won't have them.
>Here's from the 10.1 (mozilla 1.7.8, out of the patches tree) package
>the complete install script (install/doinst.sh):
>( cd usr/lib/mozilla-1.7.8/plugins ; rm -rf libjavaplugin_oji.so )
>( cd usr/lib/mozilla-1.7.8/plugins ; ln -sf /usr/lib/java/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so )
>( cd usr/lib/mozilla-1.7.8/plugins ; rm -rf libflashplayer.so )
>( cd usr/lib/mozilla-1.7.8/plugins ; ln -sf /usr/lib/netscape/plugins/libflashplayer.so libflashplayer.so )
>
>So what you see is that you only get "flashplayer" support in mozilla
>if you also installed the netscape package (and - of course - for java
>you will need either the jre (Java runtime environment) or the complete
>j2sdk (Java development kit, is under extra, I believe) package).
>
>ou can actually install both (jre first and then j2sdk), then even if
>later you decide to remove the j2sdk again, the runtime will stay (those
>files are in both packages then, so will not get removed).
>
>The same is true, by the way, of the <something>-solibs- and the corre-
>sponding FULL packages (glibc, openssl), although here the solibs one is
>NOT a pure subset of the full one (the solibs shared libraries have been
>stripped, the full development package still contains full debugging info
>in their versions of the shared objects).
>

Ah, assumptions... thy name is bafflement.

Assuming (see, an assumption) that somebody installs "all," Mozilla and
Netscape will have the plugins installed -- including, of course, Java,
and handily, FlashPlayer.

Firefox, a download-and-install, does not have Acrobat, Java,
Flashplayer, MPlayer, RealPlayer or anything else installed and ya gotta
do that for you own self.

Lame assumption, figuring the guy had installed everything (and thus
would have the Java runtime link already in place in Mozilla and
Netscape), I suppose, but we're aiming for the easy way, not the
reinvent the wheel way, aren't we? One of the first things I do is
remove the Slackware Mozilla package (and the plugins package) and
install from a Mozilla download (just 'cause I don't like the way Pat
builds the thing) and install all the plugins from a little script I
have that does that.

No biggie, one way or the other.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 09:12 AM
Jack Wang
 
Posts: n/a
Default Re: Java Runtime Problem.

thx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com