分享
 
 
 

在DebianGNU/LinuxSarge和ApplePowerBookG4上面运行IBMJava开发环境

王朝java/jsp·作者佚名  2008-05-18
窄屏简体版  字體: |||超大  

泥偶有一台Apple PowerBook G4 12-inch。在上面运行Debian GNU/Linux ``Sarge'' 3.1r0。

从 IBM Developer kit for Linux http://www-128.ibm.com/developerworks/java/jdk/linux140/ 上面下载最新的 IBM Java SDK。泥偶下载的是 IBM SDK for 32-bit iSeries/pSeries

版本 142 SR2,IBMJava2-SDK-142.ppc.tgz,59,738,488 字节长。

下载安装 Debian 软件包 java-package,apt-get install java-package。推荐安装 Debian 软件包 fakeroot,apt-get install fakeroot。

将下载的 IBMJava2-SDK-142.ppc.tgz 转换成 Debian 软件包。

~~~snip~~~

$ fakeroot make-jpkg IBMJava2-SDK-142.ppc.tgz

Creating temporary directory: /tmp/make-jpkg.XXXXWs7SXW

Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

Detected product:

Java(TM) Software Development Kit (J2SDK)

Standard Edition, Version 1.4.2

IBM Corporation

Is this correct [Y/n]:

Checking free diskspace: done.

Please enter your full name. This value will be used in the maintainer

field of the created package.

Full name [root]:Gong, Jie

Please enter a valid email address or press return to accept the

default value. This address will be used in the maintainer field of

the created package.

Email [root@localhost.localdomain]: neo@mamiyami.com

In the next step, the binary file will be extracted. Probably a

license agreement will be displayed. Please read this agreement

carefully. If you do not agree to the displayed license terms, the

package will not be built.

Press [Return] to continue:

Testing extracted archive... okay.

Create debian package:

dh_testdir

dh_testroot

dh_installchangelogs

dh_installdocs

dh_compress

find: /tmp/make-jpkg.XXXXWs7SXW/install//usr/lib/j2sdk1.4-ibm/man: No such file or directory

dh_fixperms

dh_installdeb

dh_shlibdeps

dh_gencontrol

dh_md5sums

dh_builddeb

dpkg-deb: building package `ibm-j2sdk1.4' in `/tmp/make-jpkg.XXXXWs7SXW/ibm-j2sdk1.4_1.4.2_powerpc.deb'.

copy ibm-j2sdk1.4_1.4.2_powerpc.deb into directory /tmp/

The Debian package has been created in the current directory. You can

install the package as root (e.g. dpkg -i ibm-j2sdk1.4_1.4.2_powerpc.deb).

Removing temporary directory: done

~~~snip~~~

这是做好的 Debian 软件包。

~~~snip~~~

$ ls -l ibm-j2sdk1.4_1.4.2_powerpc.deb

-rw-r--r-- 1 neo neo 59694754 2005-08-29 22:59 ibm-j2sdk1.4_1.4.2_powerpc.deb

~~~snip~~~

运行 dpkg -i ibm-j2sdk1.4_1.4.2_powerpc.deb 安装新做好的软件包。

运行 /usr/lib/j2sdk1.4-ibm/demo 下面的例子来进行测试。

~~~snip~~~

$ java /usr/lib/j2sdk1.4-ibm/demo/bigdecimal/decdemo.class

0.9 0.9

0.09 0.089999996

0.009 0.0090

0.0009 9.0E-4

0.00009 9.0E-5

0.000009 9.0E-6

9E-7 9.0000003E-7

9E-8 9.0E-8

9E-9 9.0E-9

9E-10 8.9999996E-10

~~~snip~~~

初步的测试看起来一切工作正常。但是进一步的测试表明,运行稍复杂的例子时 Java 虚拟机会崩溃。

~~~snip~~~

$ java -jar /usr/lib/j2sdk1.4-ibm/demo/jfc/Java2D/Java2Demo.jar

JVMDG217: Dump Handler is Processing Signal 4 - Please Wait.

JVMDG303: JVM Requesting Java core file

JVMDG304: Java core file written to /tmp/javacore.20050829.230634.4914.txt

JVMDG215: Dump Handler has Processed Exception Signal 4.

Illegal instruction

~~~snip~~~

看!Java 虚拟机制造出非法指令,并且崩溃了。根据参考资料2,设定 JITC_PROCESSOR_TYPE 环境变量可以解决这个问题。

修改 /usr/bin/*-j2sdk1.4-ibm 一共13个文件,在每个文件中增加一行 export JITC_PROCESSOR_TYPE="6"。修改以后的13个文件看起来象下面这样。

~~~snip~~~

$ head /usr/bin/*-j2sdk1.4-ibm

==> /usr/bin/appletviewer-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/appletviewer ${1+"$@"}

==> /usr/bin/idlj-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/idlj ${1+"$@"}

==> /usr/bin/jar-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/jar ${1+"$@"}

==> /usr/bin/javac-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/javac ${1+"$@"}

==> /usr/bin/javadoc-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exe c/usr/lib/j2sdk1.4-ibm/bin/javadoc ${1+"$@"}

==> /usr/bin/javah-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/javah ${1+"$@"}

==> /usr/bin/java-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/java ${1+"$@"}

==> /usr/bin/javap-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/javap ${1+"$@"}

==> /usr/bin/jdb-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/jdb ${1+"$@"}

==> /usr/bin/rmic-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/rmic ${1+"$@"}

==> /usr/bin/rmid-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/rmid ${1+"$@"}

==> /usr/bin/rmiregistry-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/rmiregistry ${1+"$@"}

==> /usr/bin/serialver-j2sdk1.4-ibm <==

#! /bin/sh

export JITC_PROCESSOR_TYPE="6"

exec /usr/lib/j2sdk1.4-ibm/bin/serialver ${1+"$@"}

~~~snip~~~

修改完后重新运行这个测试, java -jar /usr/lib/j2sdk1.4-ibm/demo/jfc/Java2D/Java2Demo.jar 即可顺利工作。

参考资料

1. IBM Developer Kit for Linux?, Java? 2 Technology Edition

http://www-128.ibm.com/developerworks/java/jdk/linux140/

2. 用于 Apple PowerPC 硬件上的 IBM Java 开发工具

http://www-128.ibm.com/developerworks/cn/linux/l-pow-apple.html

3. No Free Java Plugin for Mozilla (at the moment)

http://people.debian.org/~avdyk/no_free_java_plugin_for_mozilla.html

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有