How do I run the well-known Oanda.com Stocks Applet on my Pocket PC? (Incl. TONS of brand new, never-published Java tips & c
Iâ€™ve just received a question over at the Pocket PC Thoughts forums (read it in its entirety if interested) concerning how the well-known Oanda.com Stocks Applet should be run on the Pocket PC.
When you click this link on your desktop, the stocks applet will run just OK. When you click it on your Pocket PC, on the other hand, it wonâ€™t â€“ just a strange, small â€œbeta.jnlpâ€ file will be downloaded to the Pocket PC.
This is a Java-related file but, as there are no so-called â€œJava Web Startâ€ (JWS) ports on the Pocket PC, you can't directly access anything linked by it. Donâ€™t EVER try to copy the files off, say, the JWS files off your IBM J9 ( from \Program Files\IBM\WEME\runtimes\61\wm50-arm-midp20\_jvm\jre\javaws on your desktop PC ) - you canâ€™t directly run it on the PPC because itâ€™s compiled for the desktop Windows, not for the Pocket PC operating system.
That is, the only way to access ANY applet that only has a Java Web Start interface (and not a standard applet interface) is just converting its .jnlp file to a simpler, Pocket PC-compliant HTML page containing a simple APPLET tag.
The conversion itself isnâ€™t very complicated: if you just compare the above-linked source .jnlp file and the result of my conversion available here (the latter is clickable from any Java-capable desktop browser to see it indeed works. Note that you should NOT click it from the Pocket PC IEM equipped with CrEme simply because the latter doesnâ€™t parse the â€˜codebaseâ€™ attribute if itâ€™s secure and, therefore, wonâ€™t work)
You can also fully download the entire Java archive (the references beta.jar) so that you greatly speed up the connection / reduce the internet traffic (you donâ€™t end up having to fetch the 600-kbyte JAR file each time you want to connect to it and itâ€™s not in the local automatic cache): just click this link, save the JAR file and copy it to anywhere (in any directory) on your PDA.
After this, just install either Jeode or CrEme on your PDA. The latter is NOT recommended if you have a WM5 device: as you will need to explicitly switch to the Tiny mode with CrEme (read THIS for a complete tutorial - you will need to follow it if you stick to CrEme), which isnâ€™t supported under WM5, you will only be able to run the applet under Jeode if you have a WM5 Pocket PC. Please consult my other Java-related articles on these two JVMâ€™s (availibility, download etc): I wonâ€™t repeat here what Iâ€™ve already written about.
After this, download (right-click the link and choose â€œSave Target As...â€) and copy this file to the same directory where beta.jar resides. Do the same to either of the CrEme or the Jeode link ("executable") files. (Note that in the latter youâ€™ll need to modify the file URL â€œfile:///local.htmlâ€ to contain the actual path of local.html if it isnâ€™t in the root directory. With the CrEme-specific command link file, this isnâ€™t necessary.)
Now, just click the last-copied lnk file and the applet will start.
Note that, by default, CrEme isnâ€™t VGA-aware; you can just force \Windows\CrEme\bin\CrEme.exe into VGA (donâ€™t need to explicitly switch to VGA). The same stands for Jeodeâ€™s \Windows\evm.exe.
As can clearly be seen, if you plan to run the applet on a QVGA device, you will want to consider doing it in Landscape mode and, at least with CrEme, switching to full-screen mode (with the additional '-ntb' parameter in the .lnk file)
Please do check out my Java-related articles if you have Java on the Pocket PC-related questions. Iâ€™ve published dozens of high-quality articles on all questions about Java on the Pocket PC.