PDA

View Full Version : J2ME CVM (PhoneMe Advanced Basis) with Graphics


aleksandyr
2007-05-30, 15:04
WARNING: DO NOT ATTEMPT TO USE THESE FILES UNLESS YOU'RE ABSOLUTELY SURE YOU KNOW WHAT YOU'RE DOING. NO SUPPORT WILL BE PROVIDED.

http://users.wpi.edu/~chaos/cvm.zip
http://users.wpi.edu/~chaos/qt-libs-3.3.4-armel.tar.gz

The first link is a ARMEL CVM built on QT 3.3.4. (Circa 8M unpacked)
The second link is the QT 3.3.4 libraries. (Circa 40M unpacked)

Some of you might have seen my (extremely) cryptic post about libqt3-mt. This was what I was going for.

I've tested it on my N800 and was able to get basis.DemoFrame up and running (although it interferes with basically everything at this point, get ready to hit HOME and force-kill the xterm :).

INSTALL: (Note that you'll need 50M of root space. I'm working on that...)

(this assumes you downloaded the two files to your external MMC)

mkdir -p /usr/cvm
cd /usr/cvm
unzip /media/mmc1/cvm.zip
mv Personal* personal
cd /usr/lib
tar xzvf /media/mmc1/qt-libs-3.3.4-armel.tar.gz

TEST:


cd /usr/cvm/personal
bin/cvm -cp democlasses.jar basis.DemoFrame

aleksandyr
2007-05-30, 15:19
Side note: no reason, off the top of my head, this shouldn't run on OS2006. If someone with an N770 could test this / report errors, I'd be happy to re-install the appropriate SDK and get cracking.

YoDude
2007-05-31, 00:44
Have you seen these?
>> MIDP Path (http://midpath.thenesis.org/en/Start%20Page)

>>JamVM (http://jamvm.sourceforge.net/)

Would they help?

aleksandyr
2007-06-01, 01:40
JamVM: been there, ported that. :) Really, it's Classpath that's the issue.

MIDPath: It's replacement libraries for PhoneME that don't work with PhoneME. PhoneME is the only JIT I'm aware of that works reliably on the N800, and GTK bindings are in development for it. Cacao is the only other JIT I know of, and I wasn't able to get it to compile properly for various reasons that I'm fairly sure aren't as easily fixed.

YoDude
2007-06-01, 01:53
I would love to see a JVM in a home screen window sized at say 176 x 220. Individual JAR's could be accessed from the home screen menu like the feed reader does.

aleksandyr
2007-06-04, 15:06
That's going to require, as far as I can tell, QT/Embedded to create a virtual framebuffer to run in. Reading the PhoneME forums, nobody's found a GTK equivalent.

YoDude
2007-06-04, 15:57
Thanks for the update Alek keep rockin. I would pay 50 ~ $75 for an app as I described. I have quite a library of useful, MIDP 2.0 net apps for various functions.

daverup
2007-06-05, 00:29
Here's what happens on a 770, followed your instructions exactly. No window appeared. Just hung after the error, killed it with Ctrl-C. I would run ldd on libqtawt.so, but that seems to be broken on the latest 2006OS. There must be some missing libs, but without ldd, how would I find them?

cd /usr/cvm/personal/
/usr/cvm/personal # bin/cvm -cp democlasses.jar basis.DemoFrame
java.lang.UnsatisfiedLinkError: /usr/cvm/personal/lib/libqtawt.so
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibraryInternal(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Unknow n Source)
at java.security.AccessController.doPrivileged(Unknow n Source)
at java.awt.QtGraphicsEnvironment.<init>(Unknown Source)
at java.awt.QtToolkit.<init>(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at java.awt.Toolkit$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Unknow n Source)
at java.security.AccessController.doPrivileged(Unknow n Source)
at java.awt.Toolkit.getDefaultToolkit(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvir onment(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at basis.DemoFrame.<init>(Unknown Source)
at basis.DemoFrame.main(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)

/usr/cvm/personal #

daverup
2007-06-05, 15:55
Actually, I found the solution on the 770.
apt-get install libXrandr2
Now it runs.

Thanks aleksandyr

flens
2007-06-25, 09:00
Thank you for this Application.

Do you think it is hard to migrate even qt 4.2 and qt-jambi to the N800?

With regards flens

aleksandyr
2007-06-30, 17:51
flens: It's possible, but that's not the backend that PhoneME supports right now, so I didn't try.