Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

barracuda156

macrumors 68030
Original poster
Sep 3, 2021
2,668
1,716
The latest release of JDK8 (2024).

There is a caveat, it is built as headless, so no GUI. But otherwise it appears working.

jdk8_2.png


(Silly ObjC complaints are nothing PowerPC-specific and do not affect functionality, but I do not know how to get rid of them. Upstream apparently fixed them at some point, but used clangisms, so made it incompatible with gcc.)
 
Might be fun to try running Airsonic with this. One could point it at their iTunes library.

Available in MacPorts now: https://ports.macports.org/port/openjdk8-powerpc

Building on a single core should be straightforward. On a multi-core machine, a safer way (but longer) is to modify MacPorts settings (/opt/local/etc/macports.conf) use a single core (buildmakejobs 1).
If you prefer building in parallel, linking may fail at some point, but there is an easy workaround. Ping me here in such a case, I will explain what to do. (I am not sure if the issue is even relevant for Leopard, maybe it is specific to 10.6 ppc.)
 
The port has been updated to the latest release 8u432.

Also now you can just install `openjdk8`, and it will pull in `openjdk8-powerpc` automatically.
 
  • Like
Reactions: pochopsp
Hello @barracuda156 ,
Thanks for your work!
Sorry for my ignorance, but with openjdk8 would it mean we would be able to run spotifyxp on our powerpcs?
When I contacted the dev regarding a possibility of a powerpc version what he answered me was "SpotifyXP relies heavily on features that were introduced in Java8, I want to port it to Java 7 but even that would need a big big rewrite."
Does openjdk=java8?

Thanks once again
 
Hello @barracuda156 ,
Thanks for your work!
Sorry for my ignorance, but with openjdk8 would it mean we would be able to run spotifyxp on our powerpcs?
When I contacted the dev regarding a possibility of a powerpc version what he answered me was "SpotifyXP relies heavily on features that were introduced in Java8, I want to port it to Java 7 but even that would need a big big rewrite."
Does openjdk=java8?

Thanks once again

If it supports command-line mode, that might work. I do not think you can get any Java-based GUI though. Perhaps worth asking the developer?
Notice, it also requires VLC 3.0.20+ (should not be an issue for audio; with video I had mixed results and decided not to waste time on VLC, when there are better multimedia players).

Did you try to find a less painful option for Spotify? This, potentially, may work:

This might work, if the code is fixed for Qt4 (may or may not be hard): https://github.com/kraxarn/spotify-qt
 
Hey,
There is a Java game that my friend introduced me, and i wanted to play it on my PPC G5
So i suceed to build OpenJDK8, but it wont work
The game is Mindustry (it's on github)

(this are the printscreen of what i tried to do)
 

Attachments

  • image.PNG
    image.PNG
    338.2 KB · Views: 13
  • image 2.PNG
    image 2.PNG
    321 KB · Views: 13
Hey,
There is a Java game that my friend introduced me, and i wanted to play it on my PPC G5
So i suceed to build OpenJDK8, but it wont work
The game is Mindustry (it's on github)

(this are the printscreen of what i tried to do)

I am not a Java developer and I have no idea what that executable is supposed to do – from the screenshot it appears that it does not find its own components rather than failing on JDK itself – however I would not expect any GUI-requiring stuff to work. I never tried to check what an error may look like, but as it is stated above, there is no X11 support in this build (or elsewhere in existence, AFAIK), and Cocoa is broken due to Apple leaving it that way. So unless your game can run in terminal, without X window, I am afraid, it cannot work. Until/unless someone finds time to fix JDK build system and, if that be needed, sources, so that X11 backend works on macOS.

P. S. I did confirm that my builds of OpenJDK are functional – with non-GUI software. (For example, building R with Java support and then using it to build R package which uses Java. I think `fop` also uses JDK when it generates some types of documentation, and that also works fine.)
 
  • Like
Reactions: Gamerabbit
Hey,
There is a Java game that my friend introduced me, and i wanted to play it on my PPC G5
So i suceed to build OpenJDK8, but it wont work
The game is Mindustry (it's on github)

(this are the printscreen of what i tried to do)
The command and errors don't look right to me. Usually JARs are run with the java -jar command unless it's an applet, a servlet, or the developer didn't set a default class in the manifest.

Please try running the following commands from the Terminal:

Bash:
echo "PATH=" $PATH
which java
export JAVA_HOME=/opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/
java -jar /Users/jordepaul/Desktop/Mindustry.jar
 
  • Like
Reactions: barracuda156
That looks more like Java. However, it seems to be now using the system's Java (/usr/bin/java) instead of OpenJDK8. From what I see, your path looks correct with /opt/local/bin being included before the system's directories, so I'm not sure why it is not finding OpenJDK8. @barracuda156 , by chance, does the OpenJDK8-PowerPC java command have a prefix or suffix added?

EDIT: On second thought, I think I may have just answered my own question - I just noticed in @barracuda156 's screenshot in the first post that OpenJDK's java binary seems to be stored in /Library/Java/JavaVirtualMachines/openjdk8/Contents/Home/bin/java on his machine, so it is likely that it will either be the same on your machine, or if not, then perhaps a similar location based on $JAVA_HOME. @Gamerabbit , please try running the following in the terminal, which should hopefully either provide the location of OpenJDK8's java command or run the program if it is in the same path as @barracuda156 's which is likely the case:

Bash:
export JAVA_HOME=/opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/
ls -ld /opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/Contents/Home/bin/j*
ls -ld /opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/bin/j*
/Library/Java/JavaVirtualMachines/openjdk8/Contents/Home/bin/java -jar /Users/jordapaul/Desktop/Mindustry.jar

By the way, the error message you are seeing is that the JAR needs JDK 52 to run, which corresponds to Java 1.8. So, it is likely that OpenJDK8 should work as long as the game does not require anything that may not be supported in the headless build (it may also be possible to recompile the game for an earlier version of Java, depending on the source, since java often will just default to compiling it to the JVM version that's installed regardless of whether the code may be compatible with an older version).
 
Last edited:
That looks more like Java. However, it seems to be now using the system's Java (/usr/bin/java) instead of OpenJDK8. From what I see, your path looks correct with /opt/local/bin being included before the system's directories, so I'm not sure why it is not finding OpenJDK8. @barracuda156 , by chance, does the OpenJDK8-PowerPC java command have a prefix or suffix added?

EDIT: On second thought, I think I may have just answered my own question - I just noticed in @barracuda156 's screenshot in the first post that OpenJDK's java binary seems to be stored in /Library/Java/JavaVirtualMachines/openjdk8/Contents/Home/bin/java on his machine, so it is likely that it will either be the same on your machine, or if not, then perhaps a similar location based on $JAVA_HOME. @Gamerabbit , please try running the following in the terminal, which should hopefully either provide the location of OpenJDK8's java command or run the program if it is in the same path as @barracuda156 's which is likely the case:

Bash:
export JAVA_HOME=/opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/
ls -ld /opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/Contents/Home/bin/j*
ls -ld /opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/bin/j*
/Library/Java/JavaVirtualMachines/openjdk8/Contents/Home/bin/java -jar /Users/jordapaul/Desktop/Mindustry.jar

By the way, the error message you are seeing is that the JAR needs JDK 52 to run, which corresponds to Java 1.8. So, it is likely that OpenJDK8 should work as long as the game does not require anything that may not be supported in the headless build (it may also be possible to recompile the game for an earlier version of Java, depending on the source, since java often will just default to compiling it to the JVM version that's installed regardless of whether the code may be compatible with an older version).

It is easy to check what files a port installs with
Code:
port contents openjdk8-powerpc

The port file also has a note regarding paths:
Code:
% port notes openjdk8-powerpc

--->  openjdk8-powerpc has the following notes:
  If you want to make openjdk8-powerpc the default JDK, add this to shell profile:
  export JAVA_HOME=/opt/local/Library/Java/JavaVirtualMachines/openjdk8/Contents/Home
  If you want to make the JRE installed by the openjdk8 the default JRE, add this to shell profile:
  export JAVA_HOME=/opt/local/Library/Java/JavaVirtualMachines/openjdk8-jre/Contents/Home

There should also be a symlink from the real install location inside MacPorts prefix to the standard one outside, it is done here: https://github.com/macports/macport...c56f/java/openjdk8-powerpc/Portfile#L288-L289

P. S. For the info, newer version of openjdk8 port is here: https://github.com/macos-powerpc/po...dab4d3135d2f69b89159435/java/openjdk8-powerpc
 
That looks more like Java. However, it seems to be now using the system's Java (/usr/bin/java) instead of OpenJDK8. From what I see, your path looks correct with /opt/local/bin being included before the system's directories, so I'm not sure why it is not finding OpenJDK8. @barracuda156 , by chance, does the OpenJDK8-PowerPC java command have a prefix or suffix added?

EDIT: On second thought, I think I may have just answered my own question - I just noticed in @barracuda156 's screenshot in the first post that OpenJDK's java binary seems to be stored in /Library/Java/JavaVirtualMachines/openjdk8/Contents/Home/bin/java on his machine, so it is likely that it will either be the same on your machine, or if not, then perhaps a similar location based on $JAVA_HOME. @Gamerabbit , please try running the following in the terminal, which should hopefully either provide the location of OpenJDK8's java command or run the program if it is in the same path as @barracuda156 's which is likely the case:

Bash:
export JAVA_HOME=/opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/
ls -ld /opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/Contents/Home/bin/j*
ls -ld /opt/local/Library/Java/JavaVirtualMachine/openjdk8-jre/bin/j*
/Library/Java/JavaVirtualMachines/openjdk8/Contents/Home/bin/java -jar /Users/jordapaul/Desktop/Mindustry.jar

By the way, the error message you are seeing is that the JAR needs JDK 52 to run, which corresponds to Java 1.8. So, it is likely that OpenJDK8 should work as long as the game does not require anything that may not be supported in the headless build (it may also be possible to recompile the game for an earlier version of Java, depending on the source, since java often will just default to compiling it to the JVM version that's installed regardless of whether the code may be compatible with an older version).
My friend which is a big moder of the game said that it shouldn’t be possible for earlier versions of Java,
And I’m gonna try this command when I get back home (this evening)

And thanks you all for your help !
 
How do we install it ?
With Mac ports?

On 10.6.8 install my fork from https://macos-powerpc.org
It uses correct portfiles by default. (Well, assuming you either trust my code or are able to look at it to verify it is safe.)

On 10.5.8 install standard MacPorts, then follow instructions in https://guide.macports.org/chunked/development.local-repositories.html to make a local overlay repo (you do not need everything from my fork, just borrowing specifically openjdk8-powerpc should work). In result you simply need the port source in, for example `/opt/local/my_local_ports/java/openjdk8-powerpc` and add the path to it like `file:///opt/local/my_local_ports` (above the default source path) in `sources.conf` in `/opt/local/etc/macports` (assuming your installation is in the default prefix).
You can get my ports from https://github.com/macos-powerpc/powerpc-ports/releases/tag/2025.02-1 if using `git clone` is not convenient. Then just pick w/e you want from the extracted sources.
 
Is there a Mac OS 10.6 on PPC?
I was not aware of that. Just to be sure, even though I dont think that, is there a Mac OS 10.6 version for PowerMac G5?

Yeah, there is. You may refer to this thread: https://forums.macrumors.com/threads/10-6-snow-leopard-powerpc-development.2439769

I am away from my machines, but I certainly have it working on a PM G5 :)

r-app.png


I already have it, do i need to download something with it ? Or just add the specific path in the "sources.conf" file ?

In order to use any custom portfiles (it does not matter if those are mine or locally modified), you need to have a directory with those ports which you want to add or replace and point to that directory from `sources.conf`, so that MacPorts finds it. Once that is set up, you run `sudo port -v sync` (using `-v` flag will allow to see the output of what is being done), which should make new ports available. Then everything works normally.

P. S. Example from another machine:
ports_sample.png
 
Last edited:
Yeah, there is. You may refer to this thread:
Gosh, I think it would be so easier for me
If i have time this week end I’m gonna try it
Even though I already had Mac OS sorbet leopard
In order to use any custom portfiles (it does not matter if those are mine or locally modified), you need to have a directory with those ports which you want to add or replace and point to that directory from `sources.conf`, so that MacPorts finds it. Once that is set up, you run `sudo port -v sync` (using `-v` flag will allow to see the output of what is being done), which should make new ports available. Then everything works normally.
and after that I just run the mac port command for open jdk ?
 
Gosh, I think it would be so easier for me
If i have time this week end I’m gonna try it

It might (there are solid benefits of using it over 10.5.8), but keep in mind, it is a development-stage thing. (The thread has all relevant details.)

and after that I just run the mac port command for open jdk ?

Once a port is installed, it does not matter from a user perspective whether it is a “standard” port or a custom one. As long as installation paths are the same (which is normally if not always the case), you use it the same way.
You need a manual set-up to enable installing custom ports, not to install or use them. So all standard commands work as they should (port build, port destroot, port install etc.).
 
It might (there are solid benefits of using it over 10.5.8), but keep in mind, it is a development-stage thing. (The thread has all relevant details.)
I just got a 1 TB HDD so I'm planning install it (if it works, since it's old one from school). And is iTunes working better now, with more functionalities, compared to Mac OS 10.5.8?
Sorry, I don't think this thread is most place for this, but I'm really curious.
 
I just got a 1 TB HDD so I'm planning install it (if it works, since it's old one from school). And is iTunes working better now, with more functionalities, compared to Mac OS 10.5.8?
Sorry, I don't think this thread is most place for this, but I'm really curious.

It should work locally, but won’t connect to iTunes Store (and it won’t on a few newer systems as well, AFAIK).
LastFM scrobbling may or may not work, but if it does not, I can see what can be done.

P. S. These kind of questions better suit to the dedicated thread, there will be more people to reply, who know something that I don’t.
 
My friend which is a big moder of the game said that it shouldn’t be possible for earlier versions of Java,
And I’m gonna try this command when I get back home (this evening)

And thanks you all for your help !
Since it all gets converted to the same machine code (albeit interpreted JVM in Java's case) at the end of the day, there's always a way, but just the question is whether it's worth it or not. Sometimes you just have to re-compile it on an older version, but other times youhave to change too much code or start branching deep into JNI's that it would be easier to just install a newer version of Java. If I had the time and stamina, I'd be happy to try and help you convert it to a lower version of Java like 1.5 or 1.6. I used to work as a Java developer for almost a decade and have a lot of experience with this sort of thing.

Considering what you are saying I'm guessing it isn't a text game, but rather a 2D or 3D game. If so, I'm not optimistic that it will work in headless, but it is certainly worth a shot, and I'm keen to hear if it will work.
 
  • Like
Reactions: barracuda156
Since it all gets converted to the same machine code (albeit interpreted JVM in Java's case) at the end of the day, there's always a way, but just the question is whether it's worth it or not. Sometimes you just have to re-compile it on an older version, but other times youhave to change too much code or start branching deep into JNI's that it would be easier to just install a newer version of Java. If I had the time and stamina, I'd be happy to try and help you convert it to a lower version of Java like 1.5 or 1.6. I used to work as a Java developer for almost a decade and have a lot of experience with this sort of thing.

Maybe you could help with fixing X11 backend in OpenJDK? That would be a big deal.
(I am not sure Cocoa is feasible, but X11 should be.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.