WizardStan
Mega GP Mania
- Joined
- May 24, 2008
- Messages
- 16,731
java.pnd
The PXML contains two applications: install and uninstall. I recommend putting this pnd into /pandora/menu where it will put "Java install" and "Java uninstall" items into the System submenu. You could put it into /pandora/desktop, but then you'd just have two icons sitting on your desktop that never get used.
It really is as easy as hitting install. It copies a small executable to /usr/bin/java, and a small text file to ~/.javapnd containing the known location of the pnd so it doesn't have to go looking for it every time. For now (possibly forever) if you move the pnd, put it on a different card for example, you need to rerun the install program or manually edit ~/.javapnd; maybe at some point I'll make it smart enough that if it can't find it it'll try to look for it, but it's really not so hard to just run the install again, is it? Maybe set it up so multiple entries can be in the .javapnd and it tries each one. Does that sound like a good idea?
Anywho, I'd like some testing. Test the install, test the uninstall, test some jar files (after install, just run "java -jar file.jar" exactly as you would on a PC. Or even easier if it has a start script, just run the start script)
WARNING WARNING WARNING!
Even though I set HOME to the appdata directory, it still depends on the java app itself to respect this. An application that downloads or saves data may end up storing it on the firmware. I can't think of a global fix for this. Like other applications, it may have to be handled on a case by case basis, unless someone else has an idea.
Update September 10th, 2013
- HOME has been fixed to write to the appdata directory by default for a while now, so no longer any fear of saving stuff to NAND. If you call "java" directly, "HOME" is the java appdata directory, but if it is called within a PND then HOME is the PNDs appdata directory. Easy peasy.
- javac is now included with the Oracle Java. It installs javac with the openJDK as well, but it'll just popup a warning saying that OpenJDK compiler doesn't work on ARM yet.
- Oracle Java is updated to 1.7.0_21. If you haven't yet, delete the jdk directory in your appdata/java directory and it'll pick up the new one automatically.
The PXML contains two applications: install and uninstall. I recommend putting this pnd into /pandora/menu where it will put "Java install" and "Java uninstall" items into the System submenu. You could put it into /pandora/desktop, but then you'd just have two icons sitting on your desktop that never get used.
It really is as easy as hitting install. It copies a small executable to /usr/bin/java, and a small text file to ~/.javapnd containing the known location of the pnd so it doesn't have to go looking for it every time. For now (possibly forever) if you move the pnd, put it on a different card for example, you need to rerun the install program or manually edit ~/.javapnd; maybe at some point I'll make it smart enough that if it can't find it it'll try to look for it, but it's really not so hard to just run the install again, is it? Maybe set it up so multiple entries can be in the .javapnd and it tries each one. Does that sound like a good idea?
Anywho, I'd like some testing. Test the install, test the uninstall, test some jar files (after install, just run "java -jar file.jar" exactly as you would on a PC. Or even easier if it has a start script, just run the start script)
WARNING WARNING WARNING!
Even though I set HOME to the appdata directory, it still depends on the java app itself to respect this. An application that downloads or saves data may end up storing it on the firmware. I can't think of a global fix for this. Like other applications, it may have to be handled on a case by case basis, unless someone else has an idea.
Update September 10th, 2013
- HOME has been fixed to write to the appdata directory by default for a while now, so no longer any fear of saving stuff to NAND. If you call "java" directly, "HOME" is the java appdata directory, but if it is called within a PND then HOME is the PNDs appdata directory. Easy peasy.
- javac is now included with the Oracle Java. It installs javac with the openJDK as well, but it'll just popup a warning saying that OpenJDK compiler doesn't work on ARM yet.
- Oracle Java is updated to 1.7.0_21. If you haven't yet, delete the jdk directory in your appdata/java directory and it'll pick up the new one automatically.
Last edited by a moderator: