LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 12-20-2004, 04:48 PM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
FreeBSD 5.3: java installation nightmare


I have been trying for a couple of days to install a java-dk, unfortunatelly without success. Installing sun-jdk from /usr/ports/java required to download j2sdk-source, which required something else to be instaled and so on. Searching the net i found some other instructions for blackdown; "cd /usr/ports/java/linux-blackdown*" and "make install clean". Blackdown was downloaded and installed, however "javac", "java" , etc couldn't be executed. I go in /usr/local/blackdown*/bin where all java* are placed, but nothing can be executed! I downloaded also "j2sdk-1_4_2_06-linux-i586.bin" and installed in .../compat/linux/usr/share, where nothing could be executed either! I I have installed FreeBSD with linux binary compatibility; do i have to enable it or something?
Please help.
 
Old 12-20-2004, 04:52 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
The download on Sun's web page is for Linux, not FreeBSD. It won't work (as you discovered).

Please look here:

http://www.freebsd.org/java/

'Hope that helps .. PSM
 
Old 12-20-2004, 05:17 PM   #3
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
Follow theses steps :

1) If you are a java developper, you care about the version of java
* Installing linux jdk to build a native jdk after
Download the jdk from sun
cd /usr/ports/linux-sun-jdk1.4
make install clean

* build the native jdk to get mozilla plugin working
cd /usr/ports/jdk1.4

* add java to the path
setenv PATH ${PATH}:/usr/local/linux-sun-jdk1.4.2/bin

* get the dependencies
make install clean
(it will tell you what you need to download, put it in distfiles)

* again
cd /usr/ports/jdk1.4
make install clean(put java in your path as done above setenv)

2) if you are just a end user
install diablo-jdk from ports or with sysinstall if you find the binary package

Last edited by mrcheeks; 12-20-2004 at 05:18 PM.
 
Old 12-20-2004, 05:30 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
nocturna_gr:

As I said above, the problem is that Sun's "off-the-shelf" Java Runtime (JRE) is targeted for Linux, not FreeBSD. MRCheek's suggestion #1 could work; your idea of downloading Blackdown could also work.

But please do yourself a favor, look at http://www.freebsd.org/java/, and decide which (of several) alternative solutions would work best for you.

Regards .. PSM
 
Old 12-21-2004, 05:11 PM   #5
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Original Poster
Rep: Reputation: 30
mrcheek said
Quote:
2) if you are just a end user
install diablo-jdk from ports or with sysinstall if you find the binary package [/B]
I tried to install it, but it requires freebsd 5 or an earlier version. I installed the freebsd 4 compatibility package, but the same problem appeared. In freebsd.org/ports there some required ports, that are for older versions of freebsd 5. Do i have to install them first , as i read somewhere, or will i cause more problems
 
Old 12-21-2004, 05:26 PM   #6
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
i have always used the first solution. You might want to see freebsd.org/java for the second solution
 
Old 12-21-2004, 07:21 PM   #7
-X-
Member
 
Registered: Oct 2003
Location: Tx,USA
Distribution: Slackware, Red Hat, CentOS
Posts: 495

Rep: Reputation: 30
Java is different to install than Linux, but does work for Linux compatibility or native. Follow what these folks say and do some reading... as I see you didn't do. The Linux Java doesn't go in .../compat/linux/usr/share. Remove it. You should put the Linux Java 'bin' in /usr/ports/distfiles and then do the Linux Java install. Linux Java should end up in /usr/local/linux-sun-jdk1.4.2 and will put a link in /usr/local/bin/

Do this;
# cd /usr/ports/java/linux-sun-jdk14/
# make
Then read what it says.

Because of license issues, the Linux Java is used to build the native Java. After that, you can remove Linux Java.

Linux Java works ok in FreeBSD. You do need native Java for Mozilla though.
 
  


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
kmplayer installation becomes a nightmare tethysgods Linux - Software 0 12-01-2005 12:34 PM
nightmare installation with Mandrake 10.1 inneed Mandriva 6 05-06-2005 04:07 AM
Limeware and Java Nightmare HadesThunder Linux - Software 16 11-23-2004 07:47 PM
Java Plug-in Nightmare... kaz4u2dig Linux - Newbie 1 10-19-2004 01:05 AM
My Mozilla/Java nightmare... TippyToes Linux - Software 4 01-07-2004 06:22 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:27 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