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. |
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 |
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 |
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 |
mrcheek said
Quote:
|
i have always used the first solution. You might want to see freebsd.org/java for the second solution
|
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. |
All times are GMT -5. The time now is 01:45 AM. |