dropdown menu

JAVA:

lslpp -l | grep Java
java -version

java versions are here:ls -ld /usr/java*   

/usr/java... ( /usr/java131/...)
/usr/java14_64/bin # ./java -fullversion       
/usr/java14_64/bin # ./java -version   

------------------------
install:
java5 (32 bit) was needed:

we had a base and an additional update to that:
1. first installed base: Java5.sdk (smitty install)
2. update: Java5.sdk 5.0.0.250 (smitty update_all or install_all_updates..)
3. PATH probably should be update:
   in /etc/environment:
   PATH=/usr/java5/jre/bin:/usr/java5/bin:$PATH

------------------------

testing java (with a program)

1. install java, set path
   i.e in .profile: export PATH=/usr/java6_64/jre/bin:/usr/java6_64/bin:/usr/java6_64/bin/javac:$PATH
   (javac is the compiler, I just added that one too, it is not necessary anyway)

2. create a test program:
root@bb_lpar: /tmp/bb # cat myfirstjavaprog.java
class myfirstjavaprog
{
        public static void main(String args[])
        {
           System.out.println("Hello World!");
        }
}

3. compile it with javac:
root@bb_lpar: /tmp/bb # javac myfirstjavaprog.java

4. run the program (call it without .java extension)

root@bb_lpar: /tmp/bb # java myfirstjavaprog
Hello World!

4 comments:

  1. How to upgrade Java Version in AIX ?

    ReplyDelete
  2. How to set the java path on aix environment ?

    ReplyDelete
  3. update in /etc/environment or on your local .profile file if user specific java is needed

    ReplyDelete
  4. Liked the sample program, good to see the results working!

    ReplyDelete