AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

verify JRE on AIX 5.3

  • 1.  verify JRE on AIX 5.3

    Posted Fri October 27, 2006 01:22 PM

    Originally posted by: SystemAdmin


    on my 5.3 box I have a BAAN 5 and Oracle 10.2.0.1. Since many of the Oracle, BAAN also, processes use the Java codes, So i am wondering how to verify the JRE on the system? Does the AIX 5.3 come with its own JRE or may come from Oracle? Because yesteray one of the JAVA daemon for the Oracle stopped, and caused BAAN/Oracle used a lot page-in/out, therefore I want to asure the JRE. besides, when I started a service of Oracle: EM, which run on many java process, the AIX alawys responds with "Warning: JIT compiler "none" not found. Will use interpreter", I am new to the AIX so may ask some stupid questions?
    #AIX-Forum


  • 2.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 02:02 PM

    Originally posted by: SystemAdmin


    Java 1.4.2 does come with AIX 5.3, and Java 5 (aka Java 1.5) is available on the expansion pack and also can be downloaded from the IBM Java site at: http://www-128.ibm.com/developerworks/java/jdk/aix/service.html

    To tell what version of Java you have from a build standpoint use: java -version. From an AIX install basis use lslpp -l Java*. Java installs into /usr/java14 for Java 1.4.2 and /usr/java5 for Java 1.5. We also have 64 b it versions that can be installed at the same time. These go into /usr/java14_64 and /usr/java5_64.

    To switch between java versions you can source this script:

    1. setup Java environment variables
    #
    1. To run, do :

    1. . /usr/local/bin/javaenv {path}
    2. e.g.,
    3. . /usr/local/bin/javaenv /usr/java131
    if ! -d ${1} ; then
    echo "error: ${1} does not exist." >&2
    else

    export JAVAHOME=${1}
    export JAVA_HOME="${JAVAHOME}"

    export OPATH="${PATH}"
    export PATH="${JAVAHOME}/bin:${JAVAHOME}/jre/sh"
    export PATH="${PATH}:${JAVAHOME}/jre/bin:${JAVAHOME}/sh:${OPATH}"
    unset OPATH

    export CLASSPATH="${JAVAHOME}/lib:${CLASSPATH}"

    OLIBPATH="${LIBPATH}"
    export LIBPATH="${JAVAHOME}/jre/bin"
    export LIBPATH="${LIBPATH}:${JAVAHOME}/jre/bin/classic"
    export LIBPATH="${LIBPATH}:${JAVAHOME}/lib/aix/native_threads"
    export LIBPATH="${LIBPATH}:${JAVAHOME}/bin/aix/native_threads"
    export LIBPATH="${LIBPATH}:${OLIBPATH}"
    unset OLIBPATH

    fi

    Although this is the native Java, some applications such as Websphere install their own version of the IBM JDK and this must be updated by putting on Websphere fixpacks, and not by updating the IBM JDK.

    The JIT is a part of IBM Java and is always included. The message that you are getting indicates that someone unset the JIT (Just in time compiler) by setting JAVA_COMPILER=NONE or using the flag -Djava.compiler=none. There really is no JIT compiler called NONE, and so the error, so the code will just run interpreted. This is generally a very bad idea for performance reasons and is usually only used for debug.

    The only Java that runs on System P systems is the IBM Java. This is true for both AIX and Linux on Power.

    #AIX-Forum


  • 3.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 05:09 PM

    Originally posted by: SystemAdmin


    I did a ps -ef | grep java and the return process did not include the -Djava.compiler=none. So I do not know where it was set NONE for JIT. not in the .profile of either user and root. I also tried to find the javaenv, no luck. So how can I able the JIT?
    1. java -version
    Warning: JIT compiler "none" not found. Will use interpreter.
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
    Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20050609 (JIT disabled))
    #AIX-Forum


  • 4.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 05:13 PM

    Originally posted by: SystemAdmin


    The javaenv script is one I wrote and supplied in the answer to change from one version of Java to aother, it is not supplied with AIX or Java you have to cut and paste it in.

    The fact that you are getting that error indictes that there is an environmental variable set. Try
    set | grep -i java
    env | grep -i java
    unset JAVA_COMPILER
    $ java -version
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
    Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20060421 (SR5) (JIT enabled: jitc))
    #AIX-Forum


  • 5.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 05:59 PM

    Originally posted by: SystemAdmin


    Thank U very much. This problem bother me for a long time. When the box was set-up, I was not here. So I am not sure it was set up by the contractor or the "none" was a default. If I want to go back to the none, do I do "set JAVA_COMPILER=none"? This env variable is universal, right? meaning under the root. where does it exist?
    #AIX-Forum


  • 6.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 06:31 PM

    Originally posted by: SystemAdmin


    That is not normally a universal environment parameter.
    To turn it back off from the ksh use export JAVA_COMPILER=NONE
    Check to see if it is set in the /etc/environment or in the user login profile, Normally it is not set the way you have it, and this can really slow things down.
    #AIX-Forum


  • 7.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 06:33 PM

    Originally posted by: SystemAdmin


    You should also go to AIX fix site and update to a later version of Java, yours is very old.
    #AIX-Forum


  • 8.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 06:45 PM

    Originally posted by: SystemAdmin


    Thanks again. I will try to persuade my manager to update the JAVA. I check some on documents, some said using the "set JAVA_COMPILER=none" some is "set JAVA_COMPILER=NONE", which one is correct? is it case sensitive in UNIX? do i miss sth? "export" only apllies temporarily, right?
    #AIX-Forum


  • 9.  Re: verify JRE on AIX 5.3

    Posted Fri October 27, 2006 07:05 PM

    Originally posted by: SystemAdmin


    The case doesn't matter, in fact the word doesn't matter as since this points at something that doesn't exist, it simply won't call the right JIT. The set is a C shell way, while I use export for ksh. Whichever way you normally set your environment variables should work. This is standard UNIX, and nothing specific to AIX.
    #AIX-Forum


  • 10.  Re: verify JRE on AIX 5.3

    Posted Tue October 31, 2006 05:13 PM

    Originally posted by: SystemAdmin


    The syntx "unset JAVA_COMPILER" only enable the JIT in that particular session. So I went to comment out the "JAVA_COMPILER=none" in /etc/environment file. Now when i tried the emctl, I did not see the "JIY message".
    #AIX-Forum


  • 11.  Re: verify JRE on AIX 5.3

    Posted Wed November 01, 2006 04:24 PM

    Originally posted by: SystemAdmin


    after I enabled the JAVA_COMPILER, how to verify the JIT is working corrctly? speeding up the JAVA related processes? I only compared it with my Oracle Database control (10g) to retrieve data in GUI mode. It does not seem better.
    #AIX-Forum


  • 12.  Re: verify JRE on AIX 5.3

    Posted Wed November 01, 2006 09:06 PM

    Originally posted by: SystemAdmin


    Just because it does not speed up does not mean that the JIT is at fault. This could easily be a case where the bottleneck is not even in Java or you are using the wrong JDBC. There are ways to debug the JIT, but they are beyond this discussion. You might go to the problem determination guild for your level of Java. You can tell if JIT is on by using 'jave -version', or even by creating a javacore with kill -3 and looking at this text file.
    #AIX-Forum