This instruction list is a derivative of Christos' openjdk build howto. It gets one a snapshot of the openjdk7 bsd-port built (provided it builds, of course :). It's not a release (although the openjdk folks are running up to one), handle with care. I needed to fiddle with the source to get a working jar binary, see the patch. The tarballs in this directory are the result of the j2sdk rebuilding itself, so it reaches at least this level of working. No guarantees otherwise. :) + Dependencies for getting the source: - install the package devel/mercurial - install forest.py (see http://www.selenic.com/mercurial/wiki/index.cgi/ForestExtension) + build dependencies - install the package devel/nspr - install the package print/cups - install the package archivers/zip - potentially (no native X installed e.g.) install graphics/freetype2 - install the package devel/gmake - install a jdk (lang/openjdk-bin if that covers your needs) - install the package devel/apache-ant (this one wants a jdk package; if you have a non-packaged jdk you need to comment out the dependency and set JAVA_HOME and JVM_HOME in the installed files to your jdk) + Fetching the sources: - the openjdk bsd-port source: hg fclone http://hg.openjdk.java.net/bsd-port/bsd-port # note that hg.openjdk.java.net doesn't seem to have IPv6 connectivity - check out the openjdk mainline tree: hg fclone http://hg.openjdk.java.net/jdk7/jdk7/ ln -s jdk7 jdk1.7.0 - the plugins from icedtea: ftp http://www.intricatesoftware.com/distfiles/jdk-7-icedtea-plugs-1.6b.tar.gz (check for a newer version) tar -xzf jdk-7-icedtea-plugs-1.6b.tar.gz + setting up the environment: - make space etc: unsetenv LD_LIBRARY_PATH unsetenv LD_RUN_PATH unsetenv LD_PRELOAD # also any other LD_* unsetenv JAVA_HOME # best delete all env variables except the ones explicitly needed setenv TMPDIR /var/tmp # or any other place with enough free space - path overrides: setenv ALT_NSPR_HEADERS_PATH /usr/pkg/include/nspr setenv ALT_CUPS_HEADERS_PATH /usr/pkg/include setenv ALT_FREETYPE_HEADERS_PATH /usr/X11R7/include setenv ALT_FREETYPE_LIB_PATH /usr/X11R7/lib setenv ALT_DEVTOOLS_PATH /usr/pkg/bin setenv ALT_BINARY_PLUGS_PATH `pwd`/jdk-7-icedtea-plugs setenv ALT_JDK_IMPORT_PATH `pwd`/jdk1.7.0 setenv ALT_BOOTDIR /usr/pkg/java/ # the dir with bin/javac inside # and probably also setenv JVM_HOME /usr/pkg/java/ # but don't set JAVA_HOME + build: cd bsd-port gmake # go make tea and play with the cats, or something + harvest and use: # the result of the build will be in bsd-port/build/bsd-/j2sdk-image # and bsd-port/build/bsd-/j2re-image. Move them somewhere they can stay, # then setenv JAVA_HOME setenv JVM_HOME # enjoy :)