You have to bundle a JVM along with your PND, as the Pandora doesn't have one at the moment.Josh Yaxley said:I've just started learning to program in Java and I was just wondering (because I can't find this anywhere else - although maybe I've just not looked hard enough):
Once I have my final java project, how to I make it into a compatible ".pnd" file?
#!/bin/bash
# Checks for a JVM and installs it if it's missing,
jar='./bin/myjar.jar' #Insert the name of your JAR file here
if [ ! -x '/usr/bin/java' ]; then
gksudo ./bin/installjava.sh
fi
java -jar "$jar" $@
#!/bin/bash
# Installs a JVM on the Pandora
xterm -e 'opkg update'
xterm -e 'okpg install jamvm'
Yes, they're for the launch script in the pnd so your app can auto install java. You'd want to inform people who download your app that it installs java though, so it doesn't install things without their permission.Josh Yaxley said:Oh and I probably should've mentioned I use Mac OS X.
Would this make your answer any different?
EDIT: Oh wait, were those commands to be executed on the Pandora?
Well you don't have to do anything differently on your development machine.Josh Yaxley said:Oh and I probably should've mentioned I use Mac OS X.
Would this make your answer any different?
EDIT: Oh wait, were those commands to be executed on the Pandora?
Either that, or you'd just put it in a script file as I suggested. So instead of double clicking on the JAR file, the user would double click on the script, and the script would check for a Java installation and then launch the JAR. This makes it possible to put the application in a PND file, as well.Josh Yaxley said:Ah okay I understand now.
So would that code be in a readme telling the user to input it into the command line terminal?
That game uses LWJGL, which is an old library, kind of like SDL, for Java. Its... well old, slow and buggy, and won't work on the Pandora because it doesn't support OpenGL 2.0 (LWJGL requires OpenGL 2.0 or OpenGL 1.1)fusion_power said:how would be the java Performance onto the Pandora? I just asking because "Minecraft" would be very funny to play onto the Pandora:
www.minecraft.net
But this "nearly 0 graphics" game runs with Java and the VM already eats over 50% of CPU Power and I have a 2.66GHz Quad-Core PC!
Then I even wondering more, why this sureley talented coder choosed Java instead of a fast, modern alternative. Maybe it is because of the WEB interface/browser or because one and the same game runs onto Win/Linux/Mac, I don't know. Well, at least I can run it onto my PC pretty well. ^^dflemstr said:That game uses LWJGL, which is an old library, kind of like SDL, for Java. Its... well old, slow and buggy, and won't work on the Pandora because it doesn't support OpenGL 2.0 (LWJGL requires OpenGL 2.0 or OpenGL 1.1)
It's not Java that is the problem, it's LWJGL. It's perfectly fine to write games in Java, but not in LWJGL.fusion_power said:Then I even wondering more, why this sureley talented coder choosed Java instead of a fast, modern alternative. Maybe it is because of the WEB interface/browser or because one and the same game runs onto Win/Linux/Mac, I don't know. Well, at least I can run it onto my PC pretty well. ^^dflemstr said:That game uses LWJGL, which is an old library, kind of like SDL, for Java. Its... well old, slow and buggy, and won't work on the Pandora because it doesn't support OpenGL 2.0 (LWJGL requires OpenGL 2.0 or OpenGL 1.1)
dflemstr said:You have to bundle a JVM along with your PND, as the Pandora doesn't have one at the moment.Josh Yaxley said:I've just started learning to program in Java and I was just wondering (because I can't find this anywhere else - although maybe I've just not looked hard enough):
Once I have my final java project, how to I make it into a compatible ".pnd" file?
OR you can do it like this (I don't have a Pandora so I haven't actually tested it):
...and in a file 'bin/installjava.sh':Code:#!/bin/bash # Checks for a JVM and installs it if it's missing, jar='./bin/myjar.jar' #Insert the name of your JAR file here if [ ! -x '/usr/bin/java' ]; then gksudo ./bin/installjava.sh fi java -jar "$jar" $@
Code:#!/bin/bash # Installs a JVM on the Pandora xterm -e 'opkg update' xterm -e 'okpg install jamvm'
I installed this package some time ago. It takes aboutdflemstr said:Hey, could anyone try to install "openjdk-6-java" and see how much space it actually takes? (If you use an SD card install, you won't cry over the lost megabytes)