Ubuntu(PPC) 에 native JAVA 설치 (for eclipse)
우분투에는 네이티브 자바가 기본 설치되어 있지 않다.
이유와 대안과 설치 방법에 대해 여기 에 설명되어 있다.

PPC 에는 IBM 과 Blackdown 의 JDK 가 있으나 현실적으로 최신의 지원은 IBM 의 것이 유일하다고 봐야 한다.
IBM의 JDK 는 https://www6.software.ibm.com/dl/lxdk/lxdk-p 에서 찾을 수 있다.

설치 방법은 위에 내용을 '복사' 해 놓겠..다. -_-;

참고로, 우분투의 기본 자바 실행파일 위치는 /usr/bin/java 이며, java -> /etc/alternatives/java 와 링크되어 있다.


Installation Process for Version 4 (1.4)

To use the TGZ with Ubuntu, you have to convert it to a DEB. Make sure you have the tool make-jpkg installed:

        sudo apt-get install java-package

Now convert the TGZ and install the resulting DEB:

        make-jpkg IBMJava2-SDK-142.ppc.tgz
sudo dpkg -i ibm-j2sdk1.4_1.4.2_powerpc.deb

To set the new java JRE or JDK as the default, you may need to update your java alternatives. Run the following command then, when prompted, choose the newly-installed environment from the list. If update-alternatives tells you that there is only one java environment, continue onward!

        sudo update-alternatives --config java

IF you installed the JDK, the following code tests that everything's working. Open a new terminal, and try this:

        cd /usr/lib/j2sdk1.4-ibm/demo/applets/TicTacToe
appletviewer example1.html

If you see a Tic Tac Toe game, it worked! If you installed the JRE, you don't have an appletviewer or any demos so try whichever program it was that led you to install java in the first place!

Is Java crashing when you try this example? It may be because of a fixable bug in the IBM JDK. Try running "JITC_PROCESSOR_TYPE=6 appletviewer example1.html" (use 5 instead of 6 on a pre-G3), or as a last resort "JAVA_COMPILER=NONE appletviewer example1.html". If one of these works, edit your .bashrc to export the environment variable, eg: add the line 'export JITC_PROCESSOR_TYPE=6'.

Installation procedure for Version 5 (1.5)

There is the newest version of Java released by IBM for the powerpc line (i/p series). Unfortunately, the above procedure of installation does not work. Manual installation is possible, if you download the .tgz file.

Here are the instructions, assuming you downloaded it to the Desktop.

tar -zxf ibm-java2-sdk-50-linux-ppc.tgz
sudo mv ibm-java2-sdk-50-linux-ppc /opt/
sudo update-alternatives --install java1.5 java /opt/ibm-java2-ppc-50/bin/java 1
sudo update-alternatives --config java

Pick the java version we installed as the default.

$ java -showversion 
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxp32dev-20050923b)
IBM J9SE VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux ppc-32 j9vmxp3223-20050915a (JIT enabled)
J9VM - 20050914_03248_bHdSMR
JIT - 20050914_1758_r8
GC - 20050907_AB)
JCL - 20050915

If you see this output, java has been successfully installed.

However, if the full path to the executable has not been set, a error is received.

JVM not found: libjvm.so  - libjvm.so

This can be avoided by adding the full path to java in your .bashrc

echo 'PATH=/opt/ibm-java2-ppc-50/bin/:"${PATH}"' >> ~/.bash_profile

libstdc++5 is a prerequisite for this java version. If it isn't installed, you will see the following error when trying to run java.

Error loading: libstdc++.so.5: cannot open shared object file: No such file or directory

Fix it by installing libstdc++5.

sudo apt-get install libstdc++5

Plugin:

There's no Mozilla plug-in for IBM's Java on PPC if you use version 4 of Java. Version 5 of Java has a experimental plugin. You can either install Konqueror from the Debian repository (See AddingRepositoriesHowto ) or follow the instructions below to enable the plugin for firefox.

Instructions for enabling firefox plugin using version 5

cd /usr/lib/mozilla-firefox/plugins
sudo ln -s /opt/ibm-java2-ppc-50/jre/bin/libjavaplugin_oji.so

Test the installation at the Sun Java [WWW] test webpage. If the gcj webplugin is given preference over the java plugin you just installed, you can disable the gcj plugin by using the instructions below

sudo rm /usr/lib/mozilla-firefox/plugins/libgcjwebplugin.so

Konqueror Installation

To make applets work in Konqueror, you need to go the Settings menu in Konquerer, and select the Configure Konqueror and then select the Java/Java Script settings. In that panel set the java application to point to the java program in the installation you just did, probably, /opt/ibm-java2-ppc-50/bin/java. Then look at the test page on Sun's site as instructed above to check that everything worked.

Known Issues

If using version 5 of java, after the browser has been closed, java still keeps running. You will have to kill java manually, typing the command given below.

killall -9 java


Java Runtime Environment 관련

Configuring the Runtime Environment for Linux

After you install the Runtime Environment for Linux, edit your shell login script and add this directory to your PATH statement:

/opt/IBMJava2-142/jre/bin

If you installed the Runtime Environment for Linux in a different directory, replace /opt/IBMJava2-142/ with the directory in which you installed the Runtime Environmen

일케 하란 얘기? Assuming that JAVA_HOME is set up; otherwise, use /opt/IBMJava2-142/jre.

The just-in-time (JIT) compiler

The just-in-time (JIT) compiler (libjitc.so) dynamically generates machine code for frequently used bytecode sequences in Java applications and applets while they are running.

The Runtime Environment for Linux includes the JIT (libjitc.so), which is enabled by default. You can disable the JIT to help isolate a problem with a Java application, an applet, or the compiler itself.

To disable the JIT, at a shell prompt in the window where you will run the application, type:

    export JAVA_COMPILER=NONE

To enable the JIT, type at a shell prompt:

    export JAVA_COMPILER=jitc

To verify whether or not the JIT is enabled, type at a shell prompt:

    java -version

Uninstalling the compressed Tape Archive (TAR) package

To uninstall the Runtime Environment for Linux if you installed the compressed TAR package:

  1. Remove the Runtime Environment files from the directory in which you installed the Runtime Environment.
  2. Remove from your PATH statement the directory in which you installed the Runtime Environment.
  3. (Linux IA 32-bit only) If you installed the Java Plug-in, remove the Java Plug-in files from the web browser directory.

Installing and configuring the Java Plug-in for Firefox

To make the Java Plug-in available to all users:

  1. Log in as root.
  2. Change to your Firefox plugins directory (this could be different on some Linux distributions) .
    cd /usr/local/mozilla-firefox/plugins/
  3. Create a symbolic link to libjavaplugin_ojigcc3.so.
    ln -s /opt/IBMJava2-142/jre/bin/libjavaplugin_ojigcc3.s .
Note:
libjavaplugin_ojigcc3.so should be symbolically linked instead of copied; otherwise, it will not be able to find the location of the JVM.
by cyclops | 2006/02/09 10:35 | LINUX/Programming | 트랙백 | 덧글(0) | ▲ Top
트랙백 주소 : http://cyclops.egloos.com/tb/1399256
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글



◀ 이전 페이지 다음 페이지 ▶