Jump to content


Photo

Java PND


  • Please log in to reply
84 replies to this topic

#1 ONLINE   WizardStan

WizardStan

    Advanced Member

  • Members
  • PipPipPip
  • 4741 posts
  • Local time: 05:27 PM

Posted 21 November 2010 - 09:08 AM

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.

#2 OFFLINE   limpopokanoah

limpopokanoah

    Member

  • Members
  • PipPip
  • 26 posts
  • Local time: 03:27 PM

Posted 25 November 2010 - 01:21 AM

I would say that based on what mcobit has been doing the past few days it is simple. Thank you WizardStan I know alot of people wanted this.

#3 OFFLINE   otherguy66

otherguy66

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts
  • Local time: 09:27 PM
  • LocationAlternate Dimension

Posted 07 December 2010 - 01:09 PM

Nice work!

I tried getting the following peice of software running, but it crashes and some errors come up in the terminal.

http://www.google.co...Ysi2_zrEhSDwbNA
Our work is never over.

#4 ONLINE   WizardStan

WizardStan

    Advanced Member

  • Members
  • PipPipPip
  • 4741 posts
  • Local time: 05:27 PM

Posted 07 December 2010 - 03:42 PM

A quick inspection reveals that they're using a custom cursor which need to be handled properly. Cursors for windows are 32x32, cursors for X11 (Linux) are 16x16. If the JVM creates a 16x16 cursor (as it is on the Pandora) but the developer assumes that the cursor is 32x32 (because they assume Windows or don't realize there's a difference) then they'll get an IndexOutOfBoundsException. Java does have a function "getBestCursorSize" which will return the proper cursor size, but only if the developer uses it.
The only way to fix this is to get the source (which is available) and change it to use getBestCursorSize instead of assuming 32x32 (I think), which I may do tonight for you.

Java: it's only cross platform if you use it right (which is 99% of the time)

#5 ONLINE   thatgui

thatgui

    Advanced Member

  • Members
  • PipPipPip
  • 971 posts
  • Local time: 11:27 AM

Posted 10 March 2011 - 10:09 AM

I hope the gods of this forum don't crush me for hijacking this thread, but there is a german "dev" that tries to bring Nightvision to the Pandora, but after starting it directly from the commandline he gets the error:

Exception in thread "main" java.lang.NoClassDefFoundError: java/beans/PropertyChangeListener
...
Could not find the main class: com.nvastro.nvj.Nvj. Program will exit.

Maybe anyone could help him out ?

Link to the thread in the german board

#6 ONLINE   WizardStan

WizardStan

    Advanced Member

  • Members
  • PipPipPip
  • 4741 posts
  • Local time: 05:27 PM

Posted 10 March 2011 - 06:16 PM

I downloaded F_Slim's PND and (un)fortunately it runs perfectly.
The error that was listed is that it can't find the main class in the jar file. I wonder if he made a mistake in the original PND file, fixed it and reuploaded, but not before jhw had already downloaded the broken version, not realizing there was an update. I'd suggest to jhw to try downloading again, because it seems to be running great on my Pandora. This is a pretty slick app, and F_Slim has my thanks for it :)
I would report all this myself, but my German is pretty poor, I'd have to use google translate and that never goes well.

#7 ONLINE   WizardStan

WizardStan

    Advanced Member

  • Members
  • PipPipPip
  • 4741 posts
  • Local time: 05:27 PM

Posted 10 March 2011 - 06:29 PM

Eh, I responded in all my broken, google translated, German :P

#8 OFFLINE   peelie

peelie

    Advanced Member

  • Members
  • PipPipPip
  • 443 posts
  • Local time: 09:27 PM

Posted 12 March 2011 - 03:43 PM

hi

seemed to have installed okay but when trying to run the nightvision pnd get this (i run os off sdcard):

-------
sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/PANDORA1/pandora/menu/apps//java.pnd -e instjava.sh -b java
not mounted on loop yet, doing so
LoopMountedon:
/dev/loop3
Filetype is Squashfs
Mounting PND (mount -t squashfs) :
/dev/loop3 on /mnt/pnd/java type squashfs (ro)
Filesystem is vfat
Mounting the Union FS using /media/PANDORA1/pandora/appdata/java as Write directory:
mount -t aufs -o exec,noplink,dirs=/media/PANDORA1/pandora/appdata/java=rw+nolwh:/mnt/pnd/java=rr none /mnt/utmp/java
none on /mnt/utmp/java type aufs (rw,si=67327437,noplink)
none on /mnt/utmp/java type aufs (rw,si=67327437,noplink)
[------------------------------]{ App start }[---------------------------------]
find: `/media/PanBoot1/lost+found': Permission denied
find: `/media/PanBoot1/home/root/.cache': Permission denied
find: `/media/PanBoot1/home/root/.local/share': Permission denied
find: `/media/PanBoot1/home/root/.config': Permission denied
find: File system loop detected; `/media/PanBoot1/media' is part of the same file system loop as `/media/'.
find: `/media/PanBoot1/etc/polkit-1/localauthority': Permission denied
find: `/media/PanBoot1/var/volatile/run/NetworkManager': Permission denied
find: `/media/PanBoot1/var/lib/polkit-1': Permission denied
find: `/media/PanBoot1/pandora/appdata/op_nubmode/.wh..wh.plnk': Permission denied
find: `/media/PanBoot1/pandora/appdata/op_usermanager/.wh..wh.plnk': Permission denied
find: `/media/PanBoot1/pandora/appdata/op_wifi/.wh..wh.plnk': Permission denied
find: `/media/PanBoot1/pandora/appdata/op_cpuspeed/.wh..wh.plnk': Permission denied
find: `/media/PanBoot1/pandora/appdata/op_cpusettings/.wh..wh.plnk': Permission denied
find: `/media/PanBoot1/pandora/appdata/op_datetime/.wh..wh.plnk': Permission denied
find: `/media/PanBoot1/pandora/appdata/op_lcdsettings/.wh..wh.plnk': Permission denied
Found /media/PANDORA1/pandora/menu/apps/java.pnd
[-------------------------------]{ App end }[----------------------------------]
cleanup done
-------------


and this for nightvision:

sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/PANDORA1/pandora/menu/apps//nightvision.pnd -e ./start_nvj.sh -b nightvision
not mounted on loop yet, doing so
LoopMountedon:
/dev/loop7
Filetype is ISO
Mounting PND (mount) :
/dev/loop7 on /mnt/pnd/nightvision type iso9660 (ro)
Filesystem is vfat
Mounting the Union FS using /media/PANDORA1/pandora/appdata/nightvision as Write directory:
mount -t aufs -o exec,noplink,dirs=/media/PANDORA1/pandora/appdata/nightvision=rw+nolwh:/mnt/pnd/nightvision=rr none /mnt/utmp/nightvision
none on /mnt/utmp/nightvision type aufs (rw,si=67327437,noplink)
none on /mnt/utmp/nightvision type aufs (rw,si=67327437,noplink)
[------------------------------]{ App start }[---------------------------------]
Found java.pnd at /media/PANDORA1/pandora/menu/apps/java.pnd
sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/PANDORA1/pandora/menu/apps/java.pnd -b java -m
not mounted on loop yet, doing so
LoopMountedon:
losetup: could not find any free loop device

usedminor 7
freeminor 8
Filetype is Squashfs
Mounting PND (mount -t squashfs) :
/dev/loop8 on /mnt/pnd/java type squashfs (ro)
Filesystem is vfat
Mounting the Union FS using /media/PANDORA1/pandora/appdata/java as Write directory:
mount -t aufs -o exec,noplink,dirs=/media/PANDORA1/pandora/appdata/java=rw+nolwh:/mnt/pnd/java=rr none /mnt/utmp/java
/sbin/mount.aufs:mount.aufs.c:191: .: Stale NFS file handle
The Union File-system is not mounted !
The Union File-system is not mounted !
/usr/bin/java: line 21: /mnt/utmp/java/openjdk.sh: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Stale NFS file handle
cleanup done
[-------------------------------]{ App end }[----------------------------------]
cleanup done

#9 ONLINE   WizardStan

WizardStan

    Advanced Member

  • Members
  • PipPipPip
  • 4741 posts
  • Local time: 05:27 PM

Posted 12 March 2011 - 05:43 PM

hmmm... "Stale NFS file handle" is the pertinent error. It mounts the PND just fine, but then it tries to union mount the appdata directory and fails. I can't seem to find any information on this other than someone suggesting that the shell has cached some out of date inode data for something that has changed.
I'm going to fall back to the age old "try turning it off and on again"
Something has got the filesystem a little out of whack and that's the easiest way I can think of to fix it.

#10 OFFLINE   peelie

peelie

    Advanced Member

  • Members
  • PipPipPip
  • 443 posts
  • Local time: 09:27 PM

Posted 12 March 2011 - 09:28 PM

hmmm... "Stale NFS file handle" is the pertinent error. It mounts the PND just fine, but then it tries to union mount the appdata directory and fails. I can't seem to find any information on this other than someone suggesting that the shell has cached some out of date inode data for something that has changed.
I'm going to fall back to the age old "try turning it off and on again"
Something has got the filesystem a little out of whack and that's the easiest way I can think of to fix it.


NOOOOOOOOO!!!! Posted Image

on a more serious note I am running HF5 known to have problems mounting stuff, are you running HF5 as well?

#11 ONLINE   WizardStan

WizardStan

    Advanced Member

  • Members
  • PipPipPip
  • 4741 posts
  • Local time: 05:27 PM

Posted 13 March 2011 - 06:21 AM

I'm still on HF4. Don't want to upgrade until the whole "can't get GCC on HF5" thing is fixed.

#12 OFFLINE   cosurgi

cosurgi

    Advanced Member

  • Members
  • PipPipPip
  • 380 posts
  • Local time: 11:27 PM
  • Locationhttp://janek.kozicki.pl/

Posted 21 March 2011 - 06:44 PM

Do you think that you could make it auto-detectable by firefox?

It is pretty close to have more working stuff than I have on my regular desktop: both java and flash at the same time in firefox :)

#13 OFFLINE   peelie

peelie

    Advanced Member

  • Members
  • PipPipPip
  • 443 posts
  • Local time: 09:27 PM

Posted 22 March 2011 - 10:20 PM

seems to work now on HF5

/must have been my sdcard!/

#14 OFFLINE   benced

benced

    Member

  • Members
  • PipPip
  • 13 posts
  • Local time: 10:27 PM

Posted 19 April 2011 - 04:26 PM

I ran into this problem today when trying to run the Scientific Calculator from the app store,

I ended up getting it to work by taking this from the pndrun_JavaScientificCalculator.out file..

sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/PANDORA/pandora/menu/java.pnd -b java -m
(/media/PANDORA/pandora/menu/java.pnd is the path to the java.pnd file on my sd card)

and then running it in the terminal,

this created the /mnt/utmp/java folder and after that the scientific calculator program worked fine

#15 OFFLINE   pondser

pondser

    Newbie

  • Members
  • Pip
  • 1 posts
  • Local time: 09:27 PM

Posted 17 May 2011 - 04:40 PM

Thank a lot for this
It's great to see ones humble projects on our new toy ;)

#16 OFFLINE   Fusion_Power

Fusion_Power

    Advanced Member

  • Members
  • PipPipPip
  • 1623 posts
  • Local time: 11:27 PM

Posted 24 August 2011 - 11:39 PM

Ah, finaly I found it, I knew that there must be a JAVA .PND somewhere. ;) I missed it in the Repo and the App Store doesn't had any informations about that file. And EDs Archive search function doesn't seem to work correctly at the moment, so I had to ask google. :D
Which Version is this actualy and are there newer/faster Versions available that could speed up Java Apps on the Pandora?

I would try some Java Games and I hope the Pandora is fast enough for this. Notch made a little Browser based 3D Dungeon Crawler, plays well on my PC but I guess it is not that easy on the Pandora?

http://s3.amazonaws....ld48/index.html

And does this PND also installs Java itself on the SD or is only it's appdata on the SD Cards? I ask because I have to enter my password. But it seems to work even when I abort this dialouge. Weird, happend sometimes and I remember it messed up everything. These dialogs on the Pandora show really no mercy - Abort/cancel? - No chance! :lol:

EDIT: Damn, it really wants to put everything on the NAND. :( Sorry, no chance, my NAND stays as clean as possible. I would like to see a version that installs Java completely on the SD card.

#17 OFFLINE   Blue Protoman

Blue Protoman

    Shaken, not stirred.

  • Members
  • PipPipPip
  • 3742 posts
  • Local time: 05:27 PM
  • LocationLong Island, NY, USA

Posted 25 August 2011 - 02:54 AM

Actually, it does. It just installs a config file to the NAND that redirects Java usage to the PND itself.
Posted Image

#18 OFFLINE   Fusion_Power

Fusion_Power

    Advanced Member

  • Members
  • PipPipPip
  • 1623 posts
  • Local time: 11:27 PM

Posted 25 August 2011 - 03:45 PM

Actually, it does. It just installs a config file to the NAND that redirects Java usage to the PND itself.

Ah, OK.
Would be cool if this was more clearly described during the installation, so people like me are no longer scared to death. :rolleyes:

Edit: I guess I have it installed, but websites still say, I require java. :( Tested in Midori and firefox, all plugins enabled. Normaly this works on the PC but it seems not on the Pandora.

#19 OFFLINE   Silent-Hunter

Silent-Hunter

    Advanced Member

  • Members
  • PipPipPip
  • 450 posts
  • Local time: 05:27 PM

Posted 14 October 2011 - 02:10 AM

This doesn't work anymore since HF6. It says an unrecoverable error happened, and I should reinstall, which I did several times.

#20 OFFLINE   Caine

Caine

    Advanced Member

  • Members
  • PipPipPip
  • 1983 posts
  • Local time: 11:27 PM
  • LocationThe Netherlands

Posted 14 October 2011 - 02:33 AM

This doesn't work anymore since HF6. It says an unrecoverable error happened, and I should reinstall, which I did several times.

pnd_run.sh has changed in HF6. It seems to override the $HOME variable before executing the application. The original home directory should be set in $REAL_HOME. I'm not sure, but this may be the cause of this application failing to run properly.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users