OpenJDK 1.7 Java install on OS X 10.5.8

Discussion in 'PowerPC Macs' started by Lastic, Sep 27, 2017.

  1. Lastic, Sep 27, 2017
    Last edited: Sep 30, 2017

    Lastic macrumors 6502a

    Joined:
    Mar 19, 2016
    Location:
    North of the HellHole
    #1
    Since I already have Metasploit installed built from source (which I will document later when doing a clean build from scratch) , i wanted to install the GUI called Armitage also but it needs Java 1.7 .

    As such I followed this guide
    https://jnorthr.wordpress.com/2012/...r-apple-ppc-imac-macbook-g3-g4-and-g5-part-2/
    and adapted it to my needs

    Downloaded the binary archive from
    http://web.archive.org/web/20150517050519/http://www.intricatesoftware.com/OpenJDK/macppc/

    cd Downloads/
    sudo chmod 777 openjdk7u2-macppc-fcs-2012-03-14.tar.bz2
    sudo mv openjdk7u2-macppc-fcs-2012-03-14.tar.bz2 /usr/local/
    cd /usr/local/
    sudo tar -xvf openjdk7u2-macppc-fcs-2012-03-14.tar.bz2
    cd openjdk7u2-macppc-fcs-2012-03-14
    cd bin
    ./java -version
    ./javac -version

    Yippie , the binaries work !!!
    Now to move them where the Apple Java version resides

    cd /System/Library/Frameworks/JavaVM.framework/Versions
    sudo mkdir 1.7.0
    cd 1.7.0/

    I opened Finder in Terminal with open . after
    /usr/local/openjdk7u2-macppc-fcs-2012-03-14

    and did the same for
    /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0

    and moved everything from /usr/local/openjdk7u2-macppc-fcs-2012 to /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0

    cd /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0
    sudo chown -R root:wheel .

    echo $PATH
    cd ~
    cat .bash_profile
    cat .profile
    cat .bash_rc

    nano .bash_profile

    I only had a .bash_profile created by Macports to which I added at the bottom
    export PATH="/usr/java7:$PATH"

    Closed Terminal and reopened it

    echo $PATH

    Now shows /usr/java7 in the beginning of the PATH variable

    cd /usr/
    sudo mkdir java7
    cd java7

    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/java java
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/javac javac
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/javadoc javadoc
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/javah javah
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/javap javap
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/javaws javaws
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jconsole jconsole
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jdb jdb
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jhat jhat
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jinfo jinfo
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jmap jmap
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jps jps
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jstack jstack
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jstat jstat
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jstatd jstatd
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/keytool keytool
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jar jar
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/jarsigner jarsigner
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/extcheck extcheck
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/apt apt
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/appletviewer appletviewer
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/idlj idlj
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/orbd orbd
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/pack200 pack200
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/policytool policytool
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/unpack200 unpack200
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/tnameserv tnameserv
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/serialver serialver
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/servertool servertool
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/rmiregistry rmiregistry
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/rmic rmic
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.7.0/bin/rmid rmid
    sudo chmod 777 *
    cd ~
    java -version

    And tadaah OpenJDK 1.7
     
  2. Lastic thread starter macrumors 6502a

    Joined:
    Mar 19, 2016
    Location:
    North of the HellHole
    #2
    Unfortunately this doesn't help with my Armitage install since it crashes with :

    Exception in thread "main" java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:202)
    at java.awt.Window.<init>(Window.java:534)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:224)
    at ui.MultiFrame.<init>(MultiFrame.java:213)
    at armitage.ArmitageMain.main(ArmitageMain.java:200)

    Should I conclude that my openjdk install is headless ? Is there a way to check this ?
    I don't know Java so if anybody could give me pointers.
     
  3. backyardvoodoo macrumors newbie

    Joined:
    Sep 24, 2016
    #3
    I am pretty certain that the installation is headless as the full one would require the native UI bindings. Might be worth trying java -Djava.awt.headless=false to confirm? Just guessing!
     
  4. Lastic thread starter macrumors 6502a

    Joined:
    Mar 19, 2016
    Location:
    North of the HellHole
    #4
    Thanks for your reply, my Java knowledge is non-existent so I tried your hint and it works.

    java -Djava.awt.headless=false -jar /usr/local/share/armitage/armitage.jar

    First had to start Metasploit since Armitage is a GUI Java App for it.

    Metasploit OSX 10.5.png

    And altough it's slow on a PB G4 here is the Java 1.7 app running , Armitage

    Armitage OSX 10.5.png
     
  5. backyardvoodoo macrumors newbie

    Joined:
    Sep 24, 2016
    #5
    Awesome! I can see that you've got Ruby 2.2 there as well!
     
  6. G4fanboy macrumors regular

    Joined:
    Mar 9, 2013
    Location:
    Andalucia Spain
    #6
  7. Lastic thread starter macrumors 6502a

    Joined:
    Mar 19, 2016
    Location:
    North of the HellHole
    #7
    Anything that runs from a jar file and needs Java 1.7 ?
     
  8. G4fanboy macrumors regular

    Joined:
    Mar 9, 2013
    Location:
    Andalucia Spain
    #8
  9. Lastic thread starter macrumors 6502a

    Joined:
    Mar 19, 2016
    Location:
    North of the HellHole
    #9
  10. MysticCow macrumors 6502a

    Joined:
    May 27, 2013
    #10
    And doesn't make a specific system call for the Appe Java?
     
  11. Calum2 macrumors member

    Calum2

    Joined:
    Jan 4, 2017
    #11
    Damn. Guess I shouldn't have spent my time getting Java 1.6 working then lol.
     
  12. MysticCow macrumors 6502a

    Joined:
    May 27, 2013
    #12
    Until it works with Pyware version 7 (and it won't--I've tried) it just won't be for me. :( Programs like that make a highly specific system call to the Mac Runtime for Java that Apple used to supply. Literally, the final Apple Java is all I should need to get it running, yet it doesn't exist for PPC.
     
  13. thefriendshipmachine macrumors regular

    Joined:
    Apr 14, 2017

Share This Page