Zaurus Java FAQ
Where did this Java FAQ come from?
- This FAQ has been contributed by Gerald J. Normandin Jr.
It has been found at http://adorphuye.com/zaurus/java/faq.jsp
The original author of this FAQ is Steph Meslin-Weber, mailto:email@example.com. A fair number of people have also contributed in various ways by providing information, links or criticism:
- All the fine folks on the [zaurus-java] mailing list
- Andrew Girow
- Gurminder Khamba
- Jim Huang
- John Barrus
- Pierre MâˆšÃ tras
- Rehana Ramzan
- Steve Weyer
- Steve Yegge
- Leticia Golubov
- Peter Harverson
- Java language extensions provide added functionality to the core Java api.
When Java 1.1 was released, additional extensions (Swing, Collections) were also released to make up for gaps in the api coverage.
As each new Java version ships, these extensions get included into the core api. Currently on the Zaurus, only PersonalJava 1.2 - equivalent to Java 1.1 - is available, and so we start looking at the api extensions for extra functionality. </ul>
Can I use Secure Sockets on the Zaurus?
- Thanks to Steve Weyer for providing this answer. So, at the expense of a bulky library, we can indeed use JSSE on the Zaurus.
From Steve Weyer:
(non JSSE things snipped)
regarding extensions, Sun's JSSE (Java Secure Socket Extensions) 1.0.2 works fine with PJ on Z. this allows https: connections among other things. I've used with my CrozzWord app for secure login to NYTimes subscription area. downside: it's ~420K </ul>
Can I use SVG on the Zaurus?
- Yes, it is now possible to use SVG on the Zaurus and indeed, on any J2ME/PersonalJava VM. I have tested TinyLine 1.2 on the Zaurus using the demo kindly sent to me by Andrew Girow and can say that it performs very well. Downloads for this latest version of TinyLine are available from the TinyLine website.
Here are a few screenshots to give you an idea of the demo:
" target="_blank <img src=http://www.oesf.org/faq/javafaq/tinyline01_tn.png></img>] " target="_blank <img src=http://www.oesf.org/faq/javafaq/tinyline02_tn.png></img> " target="_blank <img src=http://www.oesf.org/faq/javafaq/tinyline03_tn.png></img> " target="_blank <img src=http://www.oesf.org/faq/javafaq/tinyline04_tn.png></img> " target="_blank <img src=http://www.oesf.org/faq/javafaq/tinyline05_tn.png></img> " target="_blank <img src=http://www.oesf.org/faq/javafaq/tinyline06_tn.png></img> " target="_blank <img src=http://www.oesf.org/faq/javafaq/tinyline07_tn.png></img>
Can I use Swing?
- Before reading the answer consider this: Swing uses floating point coordinate systems and transformations - the Zaurus is based on the ARM SA-1100 chipset which does not have a floating point unit. The net result is that any floating point operation has to be emulated and that's very slow.
Short answer: No.
Long answer: Swing can be used on the Zaurus with the Jeode VM but you must use the unbundled Swing distribution1 and you must edit SwingUtilities.java in that distribution. This is due to a Swing bug2 that will not be fixed by Sun. Also note that certain parts of Swing use native code which is currently unavailable for the ARM platform; this means parts of Swing will not work.
Note: Because of the Sun License, I cannot redistribute modified Swing sources or jar files.
Instructions taken from the bugparade report2:
1. Extract the src.zip (from the swing-1.1.1fcs distribution). 2. in javax/swing you'll find the SwingUtilities.java file. 3. Open it your favorite editor 4. Comment out line 677:
Method m = Class.class.getMethod ("getProtectionDomain", null);
5. Insert the line
Method m = Class.class.getMethod ("getPackage", null);
just after the old one.
6. Save and compile (javac -classpath swingall.jar:. javax/swing/SwingUtilities.java) 7. Backup the Swingall.jar archive in the root of the exstracted src.zip (ie the same level of the javax and com dirs). 8. Jarize it (jar uvf swingall.jar javax/swing/SwingUtilities.class)