中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 操作系统 > BSD > 综合文章
Java 2 SDK 1.4 on OpenBSD
作者:未知 时间:2005-09-13 22:51 出处:Blog.ChinaUnix.net 责编:chinaitpower
              摘要:Java 2 SDK 1.4 on OpenBSD
Java 2 SDK 1.4 on OpenBSD

Java 2 SDK 1.4 on OpenBSD

Requirements

You will need OpenBSD/i386 3.6 release or later to build and run the 1.4 JDK. At least 448M of virtual memory (real + swap) is needed to build the JDK. More may be needed depending on what else is running on the build system. Having less then 256M real memory will increase the already long build time. You will also need approximately 1.7GB of free disk space in build area.

Licensing

You will need to agree to the Sun Community Source License (SCSL) to be able to download many of the needed distfiles. The resulting binaries created from the 1.4 port are licensed under the SCSL and have restrictions on use and distribution. No compatibility testing (TCKs) have been performed on the JDK for OpenBSD.

Distfiles

You will need to manually fetch four distfiles for the 1.4 port and one distfile for the 1.3-linux port which is a build depend.

First you will need to download the Java 2 SDK 1.4.2 SCSL Source and the SCSL Binaries (j2sdk-1_4_2-src-scsl.zip and j2sdk-1_4_2-bin-scsl.zip).

Once you have done this and agreed to the SCSL you can download the latest BSD JDK 1.4.2 patchset (bsd-jdk14-patches-X.tar.gz). Patchset 7 or greater is required for OpenBSD support.

Lastly you will need to download the first release of 1.4.2 Linux binary SDK (j2sdk-1_4_2-linux-i586.bin) and the latest 1.3.1 Linux binary SDK (j2sdk-1.3.1_XX-linux-i586.bin). Note: sometimes the latest 1.3.1 Linux binary SDK becomes out of sync with the 1.3-linux port. If this should happen you can download the previous releases here.

Put all five distfiles into /usr/ports/distfiles.

Building and Installing

For 3.6 release/stable download the port here. Extract as follows:

$ cd /usr/ports/devel/jdk/
$ tar xzf jdk14.tar.gz
$ cd 1.4

For 3.7 and later the port is at /usr/ports/devel/jdk/1.4.

Consider installing the build and run depends from packages to save time and disk space. Here's an example of how to do that for 3.6 (for other releases adjust package versions as needed):

$ PKG_PATH=ftp://closest.mirror.openbsd.org/pub/OpenBSD/3.6/packages/i386
$ export PKG_PATH
$ sudo pkg_add gtar-1.14.tgz                nspr-4.4.1.tgz                gmake-3.80.tgz                unzip-5.51.tgz                zip-2.3p0.tgz                iodbc-2.50.3.tgz                openmotif-2.1.30.5.tgz                ghostscript-fonts-6.0.tgz                redhat_base-8.0p4.tgz

Increase your data limit to 448 megabytes and stack limit to 8 megabytes. The commands for this are different based on your shell. For ksh(1), zsh(1) and bash(1):

$ ulimit -dS 448*1024
$ ulimit -sS 8*1024

or for csh(1) and tcsh:

$ limit datasize 448m
$ limit stacksize 8m

NOTE: The 'default' login class can not change the data limit to 448 megabytes. If you are unable to increase your data limit to 448 megabytes, then use vipw(8) to change your login class to 'staff' or adjust your current login class in login.conf(5).

Build the packages:

$ SUDO=sudo make package 2>&1     | /usr/ports/infrastructure/build/portslogger .

After several hours two packages will be created, one for the JDK and one for JRE.

To install the JDK:

$ SUDO=sudo make install

To install the JRE:

$ SUDO=sudo SUBPACKAGE=-jre make install

Optionally, you can uninstall the build depends. Here's an example for 3.6:

$ sudo pkg_delete gtar-1.14                   nspr-4.4.1                   gmake-3.80                   unzip-5.51                   jdk-linux-1.3.1_12                   redhat_base-8.0p4                   libiconv-1.9.1                   gettext-0.10.40p1                   bzip2-1.0.2

Running

To use the JDK or JRE you will likely need to increase your limits as described in the Building and Installing section above. Adjusting limits in login.conf(5) for your login class is the best way to ensure java has the resources it needs.

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有