Yippee! I finally got java to build and work, FreeBSD 5.3 and jdk14

Nikolas Britton freebsd at nbritton.org
Sun Oct 31 14:53:21 PST 2004


I'm having a hard time believing it myself, but I just successfully 
built the native jdk14 port and *AND* got firefox to use the plug-in.

Here is what I did to get FreeBSD 5.3RC1 and Java (jdk14) (and firefox 
jre plug-in) working.

Step 0: Installed FreeBSD 5.3RC1 and enabled/installed linux compat mode.
    Did some stuff. like edit config files, installed some ports, and 
costomize kernel etc.
Step 0: cvsup'ed new ports and src and rebuild everything with 
portupgrade -arRwWf, buildworld, and buildkernel.
    Did some more unrelated stuff to the system.
Step 1: su'ed to root.
Step 2: cd'ed to /usr/ports/java/jdk14
Step 3: Typed in "make" and waked away (forgetting that it wanted me to 
download some files).
Step 4: Came back after work only to find it ran for about 5mins and 
wanted me to download some files becouse Java is not "free" or 
"opensource" (Fuck You Sun).
Step 5: Downloaded: j2sdk-1_4_2-bin-scsl.zip,  j2sdk-1_4_2-src-scsl.zip, 
j2sdk-1_4_2_05-linux-i586.bin, and bsd-jdk14-patches-6.tar.gz and put 
them in /usr/ports/distfiles/
Step 6: Retyped "make".
Step 7: waited 5 hours for the to build fail.
Step 8: Search for why "Java HotSpot(TM) Client VM warning: Can't detect 
initial thread stack location".
Step 9: Found out that this file: "CurrencyData.java" sometimes gets 
corrupted. 
http://lists.freebsd.org/pipermail/freebsd-java/2004-July/002574.html
Step 10: Removed the first line in that file 
"/usr/local/ports/java/jdk14/work/control/build/bsd-i586/gensrc/java/util/CurrencyData.java" 
with a text editor.
Step 11: Remembered hearing something about having to mount linux procfs 
or else werid stuff will happen, so I did that too: "mount -t linprocfs 
linprocfs /compat/linux/proc" 
http://www.brettsbsd.net/~estrabd/blog/index.php?/archives/21_Java_1.4_on_FreeBSD_4.10_in_8_steps.html
Step 12: Ran "make" again.
Step 13: Wait 5 more hours.
Step 14: Its Done!!! now I type in "make install".
Step 15: Its Done!!! holy shit, it worked.
Step 16: Tested java by cd'ing into "/usr/local/jdk1.4.2/jre/bin" and 
ran "./java -version".
Step 17: Rejoiced in the fact that I now have a native and working 
version of java installed!!!!
Step 18: cd'd into /usr/ports/www/firefox.
Step 19: Peeked inside the Makefile for Opt Flags and saw at the end of 
the file that firefox will automatically look for the java plug-in and 
take the appropriate steps to use it.
Step 19: Ran "make WITH_OPTIMIZED_CFLAGS=YES WITH_NEW_ICON=YES 
WITH_HEADERS=YES install".
Step 20: Waited 5 hours.
Step 21: Noticed that It found the plug-in and did what it had to do to 
use it.
Step 22: typed in "rehash".
Step 23: fired up X and firefox. and typed in "about:plugins" into 
firefox to confirm the plug-in was there.
Step 24: Then I went here to test the plugin: 
http://weather.noaa.gov/rader/mosaic.loop/DS.p19r0/ar.us.conus.shtml
Step 25: Rejoiced again coz it worked!!!

All this for a fucken plugin, It's reasons like this that Java never 
took off and why you company is failling, shame on you Sun Microsystem.



More information about the freebsd-newbies mailing list