DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default Java installiation question

Here is my problem:

following this guide: http://www.openbsd.org/faq/faq13.html#javaplugin

combined with this: http://www.softwareinreview.com/bsd_...enbsd_4.2.html

I managed to build java from ports!But when i type on mozilla "about : plugins" i see no plugins installed" :O

How come there is no java plugin?

I'm using mozilla 3.5 & OpenBSD 4.9

my java hom is set right i think:

Code:
$ env
_=/usr/bin/env
PATH=/home/sepuku/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:/usr/local/jdk-1.5.0/bin:.
SHELL=/bin/ksh
XTERM_VERSION=XTerm/OpenBSD(267)
USER=sepuku
PKG_PATH=ftp://ftp.cc.uoc.gr/mirrors/OpenBSD/4.9/packages/i386/
MAIL=/var/mail/sepuku
WINDOWPATH=5
HOME=/home/sepuku
DISPLAY=:0.0
TERM=xterm
JAVA_HOME=/usr/local/jdk-1.5.0/
XTERM_SHELL=/bin/ksh
XAUTHORITY=/home/sepuku/.Xauthority
WINDOWID=23068685
XTERM_LOCALE=C
LOGNAME=sepuku
Can someone that had success in getting java tell me what have i done wrong? :/

Last edited by sepuku; 4th July 2011 at 12:29 PM.
Reply With Quote
  #2   (View Single Post)  
Old 4th July 2011
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Some of the more experienced members of the forum do not strongly advocate OpenBSD as a Java platform. The java port is old and recent efforts concern OpenJDK. None-the-less, I believe that it should work.
The FAQ describes making the symbolic link to the java binary and also having Java and Javascript enabled under the preferences section of Firefox. Perhaps you could post the link code and double check your Firefox preferences
Reply With Quote
  #3   (View Single Post)  
Old 4th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Hello there shep and thanks for your reply!Java & Javascript are enable in the preferences section!But sorry i don't understand what exactly you want me to post! :/
Do you mean the makefile in /usr/ports/devel/jdk/1.5 ?Sorry for the noob questions but i just started getting used to this stuff since in Ubuntu that i as using before openbsd i never needed it!
Reply With Quote
  #4   (View Single Post)  
Old 5th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

OK,i got it what you said.After make install,i had no messages that's why i was lost!I found the file " MESSAGE-main" in
Code:
/usr/ports/devel/jdk/1.5/pkg
which says:

Code:
Use and distribution of this technology is subject to the Java Research
License included herein.

To use the Java plugin with Seamonkey or Firefox you must create
a symbolic link (do not copy or hard link) from

${PREFIX}/${JDKHOME}/jre/plugin/${MACHINE_ARCH}/ns7/libjavaplugin_oji.so

to your local Mozilla plugins directory, which is found at

~/.mozilla/plugins/

or to the shared Mozilla plugins directory, which is found at

${PREFIX}/lib/mozilla-plugins
then when i give :

Code:
 sudo ln -s ~.mozilla/plugins /usr/local/jdk-1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so
i get
Code:
ln: /usr/local/jdk-1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so: File exists
Should i delete the file?Or this would make things worse?

Last edited by sepuku; 6th July 2011 at 11:32 PM.
Reply With Quote
  #5   (View Single Post)  
Old 5th July 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

You do not have a symbolic link, sepuku. Your ln operands were backwards. The order is source then target, or source then directory.

You might try something like this (I've not tested this, but it may work), as it uses source then directory:

$ ln -s /usr/local/jdk-1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins

Please review the ln(1) man page.
Reply With Quote
  #6   (View Single Post)  
Old 5th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Well you are right jiggimi,i tried visa versa(source then directory) also the command ran.I rebooted yet i see no plugins in mozilla!

also there was no dir "plugins" to .mozilla so i created one so the command could ran.

Last edited by sepuku; 5th July 2011 at 12:47 PM.
Reply With Quote
  #7   (View Single Post)  
Old 5th July 2011
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

If all went well you should see
Code:
libjavaplugin_oji.so
in the output of
Code:
ls -al ~/.mozilla/plugins
It has been a while but I recall I had better luck using the shared Mozilla plugins directory.
To accomplish the alternative symlink as root
Code:
rm -rf ~/.mozilla/plugins/libjavaplugin_oji.so
Code:
ln -s /usr/local/jdk-1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/local/lib/mozilla-plugins/
The run
Code:
ldconfig
to update the symlinks without rebooting.
Reply With Quote
  #8   (View Single Post)  
Old 5th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Thank you shep it worked.Just for anyone else that happens to have the same issue:
reboot was necessary! after running
Code:
ldconfig
i could not run mozilla unless i rebooted my system!Now i see java on my plugins!Thank you very much again!
Reply With Quote
  #9   (View Single Post)  
Old 5th July 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Where did you find instructions telling you to run ldconfig(8)???!!!???
Reply With Quote
Old 5th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

Shep told me so.Why?
Reply With Quote
Old 5th July 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Ah, missed that he'd suggested it.

And I asked, because that has nothing to do with symlinks, and everything to do with run time libraries. And running that command, that way, will remove all local shared libraries from lookup. It will make almost every executable in /usr/local/bin unusable.

If you read the man page (link provided in my prior post), you will see that it says:
Quote:
It scans a set of built-in system directories
and any directories specified on the command line (in the given order)
looking for shared libraries and stores the results...
Those built-in directories do not include any of your 3rd party libraries, or X libraries. Look at where ldconfig is run by /etc/rc:
Code:
if [ -f /sbin/ldconfig ]; then
    echo 'creating runtime link editor directory cache.'
    if [ -d /usr/local/lib ]; then
        shlib_dirs="/usr/local/lib $shlib_dirs"
    fi
    if [ -d /usr/X11R6/lib ]; then
        shlib_dirs="/usr/X11R6/lib $shlib_dirs"
    fi
    ldconfig $shlib_dirs
fi
I'm not blaming Shep for this, as mistakes are easy to make. But please, take this as a warning. You should NEVER blindly type what someone gives you. Ever. You should understand what you are doing before doing it.
Reply With Quote
Old 5th July 2011
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Sorry to create the confusion. In linux ldconfig also updates "trusted libaries" which usually includes /usr/lib/ directories where linux version of JDK/JRE typically install. For most linux systems ldconfig will update the java symlink. I am assuming that /usr/local/ is not a "trusted" directory in OpenBSD unless it is set by the user LD_LIBRARY_PATH.

I learned a lesson not to over extend linux experience into OpenBSD/unix.
Reply With Quote
Old 5th July 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Default

@jggimi : OK I'l be more careful from now on! ;P
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
external drive partition question + fdisk question gosha OpenBSD General 15 15th June 2009 02:00 PM
java compiler bsdnewbie999 OpenBSD Packages and Ports 8 9th August 2008 12:18 PM
Installing java question neurosis FreeBSD Ports and Packages 3 22nd July 2008 02:42 AM
Java JDK Oko OpenBSD Packages and Ports 10 13th July 2008 07:39 PM
Java socket programming question 18Googol2 Programming 3 3rd May 2008 11:50 AM


All times are GMT. The time now is 11:17 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick