Release Java


WizardStan

Mega GP Mania
Joined
May 24, 2008
Messages
16,731
With Oracle releasing an official Java binary, I figured it was time to update the old java.pnd. It still contains the openJRE if that's what you want, but the official Oracle release is much better, faster, more efficient.


Unfortunately, due to licensing restrictions, I can't distribute that release. Best I could do was have it "install" from the download. Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html and download the Linux ARM tar.gz file to your SD card, run the "Java Install" in the PND and it'll take care of the rest.
 
I'm still unable to run any Java games. I have the latest JRE ARM release from Oracle's website, and tried both the 33.88 MB PND and the 99 MB PND from WizardStan's website, but nothing will run with the Run Jar application. When I run Java Install it asks me to manually find the JAVA PND, so I navigate to it. It asks me which version of Java I would like to run, so I choose the Oracle version. It then tells me that the .tar.gz file is incorrect, and to check the support boards for details. I wasn't able to run any .jar files at all. Shouldn't I be able to run them by double clicking them, or do they have to be in a specific folder? I seem to have this issue with all .PNDs, actually.
 
Last edited by a moderator:
Last edited by a moderator:
When I run Java Install it asks me to manually find the JAVA PND, so I navigate to it.
This should only happen if it can't find java.pnd by itself. Did you rename the PND? I wonder if there's something unusual with your setup. Did you copy it to the NAND or are you running your OS off SD card?

It asks me which version of Java I would like to run, so I choose the Oracle version. It then tells me that the .tar.gz file is incorrect, and to check the support boards for details.
Before doing that it should have asked you to also select the .tar.gz file corresponding to the Linux ARM jre. It looks for a file matching the pattern "jdk-.*-linux-arm-sfp.tar.gz". If you select a file that isn't a .tar.gz file, it'll close saying "not an expected tar.gz file". If you select a tar.gz file that doesn't conform to the pattern (doesn't contain linux-arm in the name, for example) it'll close saying "does not appear to be a valid Linux ARM JDK". If the file name matches, it'll try to extract, which might fail (but probably won't) saying "could not extract JDK. This is an unknown error. Please visit the openpandora.org forums for support".


The only reason I can think of it failing is if the file is corrupt. jdk-7u6-linux-arm-sfp.tar.gz should be 66MB, exactly 68197004 bytes. Can you double check that and redownload if it is not complete?
 
So I tried to install this but java apps fail silently with Sun Java. They work fine in openjre, but way too slowly to be useful.


More detailed discription:


Anyways, I downloaded the jdk-7u6-linux-arm-sfp.tar.gz which matches the size listed above and placed it in the root directory of my main (left) card and removed the right card. Ran the "Java Install" from the system memory, selected "Yes" for Sun Java, it said it was already installed so I selected overwrite. Entered user password for sudo rights, it said JavaWS is already installed, I hit overwrite again. It claims to be installed, but didn't say anything about extracting files and it only took 1-2 seconds so probably not long enough to do it the background. All java apps fail silently on startup.


It does not ask me for the location of the jdk .tar.gz.


I checked and I have a "java" script in /usr/bin/java and ~/.javapnd file with the correct pnd path. I do not have an extracted jre in appdata.


If I try to uninstall, it claims it was not installed and forcing it anyway does not remove the two files listed above.


I also tried manually extracting the sun jdk .tar.gz renaming to "jre" and placing in /media/cardname/pandora/appdata/java, but that didn't seem to do anything.


Any suggestions? Reflash and try again?
 
Strange. Try choosing "no" to install the OpenJDK, see if that does anything different. It's possible I uploaded the wrong file, but I can't imagine how I did that.
 
I followed your steps exactly. I have the correct 66MB Java file from the link you provided, I tried both of the Java PNDs, tried extracting the java .tar.gz for ARM, renaming the folder to jre and placed it in the /pandora/appdata/java folder. I also kept the .tar.gz compressed and that didn't work either. I used the Run Jar application to try my Java files, and also tried to run the samples provided on Oracles' website, to no avail. It's possible that something happened to the file's you uploaded. I also have that problem where the extraction process only takes about a second, and doesn't seem to be extracting anything. The uninstall Java option dosn't remove anything... any insight as to what the cause is?
 
I had the same problems when I startet the PND right from PNDManager after updating it.


IIRC I then started it from the menu. And this time it asked for the downloaded file with a normal file requester. I selected the file, it was extracted and installed with no problems!
 
I had tried installing openJDK earlier and I thought it worked, but now I try again and it is also failing to run programs. The install program detects a previous java install, I choose overwrite for java and javaWS, it creates the ~/.useopenjdk file and claims a successful install, but programs do not run.
 
open a terminal and just type "java". That will definitively say whether it was installed properly or not.


Also, what is the output of "cat ~/.javapnd"?
 
open a terminal and just type "java". That will definitively say whether it was installed properly or not.


Code:
$ java

bash: java: command not found

That seems pretty clear, though not why it didn't install.

Also, what is the output of "cat ~/.javapnd"?


Code:
$ cat ~/.javapnd

/media/cardname/pandora/menu/java.pnd
 
Last edited by a moderator:
To make sure I didn't accidentally introduce differences (by uploading a buggy version to the repo, for example) I downloaded it again and reran the install from the menu. Running it from PndManager causes it to run the uninstall for some reason, so that won't work.


Anywho, running from menu->System->Install Java; "Open or Sun Java?" Window appears, choose "yes"; the next question asking if you've already downloaded the JDK and where to get it, choose "yes"; navigate, select the jdk-7u6-linux-arm-sfp.tar.gz file, pops up an alert "Checking file jdk-7u6-linux-arm-sfp"; hit ok and the SD card blips green for several seconds (maybe I can investigate a progress bar for this part); asks for passwords to install /usr/bin/java and /usr/bin/javaws; and it works.
 
ok now works for me...previously i (wrongly) renamed the jdk-7u6-linux-arm-sfp.tar.gz file to jre.tar.gz and it didn't find it....
 
Last night I deleted everything I could find relating to java on my pandora: the pnd, ~/.javapnd, /usr/bin/java/java, /media/card/appdata/java folder. I also rebooted.


Then I redownloaded the pnd and the jdk .tar.gz and ran install from the menu. It seemed to work this time, asking for the location of the tar.gz file, taking some 30 minutes or so to unpack it successfully to the appdata folder. Despite my efforts to purge old java related files the install program still seemed to think java was already installed and requested permission to overwrite. After giving it said permission it proclaimed a successful install, however, typing "java" in a terminal still yields a command not found error and programs do not run.


The /usr/bin/java/java script is back and the ~./javapnd file lists the correct directory of the pnd. Attempting to run /usr/bin/java/java yields the following:



Code:
/usr/bin/java$ ./java

Found java.pnd at /media/biggun/pandora/menu/java.pnd

Attempting to execute jvm at /mnt/utmp/java/jdk/bin/java

Args are:


. . . [bla bla arg info from man help] . . .


See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for devicermdir: failed to remove `/mnt/utmp/java': Device or resource busy

So it seems like the script can run and find both the pnd and jdk directory.
 
Last edited by a moderator:
Ahah, I see. You have a /usr/bin/java directory somehow. That shouldn't be a directory. "sudo rm -r /usr/bin/java/" that sucker and try again. If you want to skip the install, first copy "/usr/bin/java/java" to your SD card, then after deleting the wayward java directory, copy it back to "/usr/bin".


Strange that it took 30 minutes. Should only take about 30 seconds, but if it takes minutes then it takes minutes, not sure there's any way to speed it up.
 
Ahah, I see. You have a /usr/bin/java directory somehow. That shouldn't be a directory. "sudo rm -r /usr/bin/java/" that sucker and try again. If you want to skip the install, first copy "/usr/bin/java/java" to your SD card, then after deleting the wayward java directory, copy it back to "/usr/bin".
Sweet. Seems to work now. Much quicker than openjdk. Thanks for helping me out.
 
Any chance at getting the IcedTea plugin compiled? I tried it in PanDebian and it works nicely.
 
I clearly have Oracle Java installed on my Pandora, as I can run all Pandora games that require it, such as J Cloister Zone and Reign of Brains. My problem is not being able to run JAR files. I tried Minicraft which is supposed to run, and the samples that come with the JRE, but none work. I use the "Run Jar" application, browse to the JAR file, and run them, but nothing happens. I even tried running mobile apps with Microemulator, to no avail. What am I doing wrong?
 
Last edited by a moderator:
Tried this from a terminal?


java -jar yourprogram.jar
 
Last edited by a moderator:
Back
Top