 |
|
 |
Zaurus User Group FAQs (frequently-asked questions)
|
|
Category: Main -> Zaurus Java FAQ -> Miscellaneous
Answer |
· What Classes can I use?
- Jeode supports the PersonalJava 1.2 Specification. As this specification is compatible with jdk1.1.8, you can make/port your program using the jdk1.1 classes.
|
· What graphic file formats does Jeode support?
-
The PersonalJava spec only requires gif, jpg and png support for compliance and so those formats are supported to some degree.
|
GIF |
JPG |
PNG |
Paletted |
 |
 |
 |
TrueColour |
 |
 |
 |
Lossless |
 |
 |
 |
Transparency |
 |
 |
 |
Back to top
|
· Can I develop ON the Zaurus?
- Absolutely!
The build-in keyboard makes this an ideal use for the Zaurus, although you'd probably be faster on a desktop machine. The keyboard on the Zaurus is not, in my opinion, intended for writing novels ;-)
Because of the limited memory footprint of the Zaurus you shouldn't expect to be able to run, say, NetBeans, but with an editor and a compiler you should be set to go!
So far, compilers that run on the Zaurus include Kopi and Jikes.
Editors can include:
* EIDE a small Java ide for the Zaurus
* Built-in Text editor
* Built-in VI
* tkcEditor
* kVim (not available yet)
Additionally, Pierre Métras has written a HOWTO based on MinIDE+Kopi at http://www.alterna.tv/jsearch/. As this HOWTO is in French, I'm in the process of translating it into English - should be finished in a few days. (Current translation at here)
Back to top
|
· Can I play sounds using Java?
Previously, people did not seem to have had any success using the normal Applet.play() methods, having limited success using the undocumented and unsupported sun.audio and writing directly to the /dev/dsp device using a FileOutputStream (thanks Ralph Curtis, John McDonnell and Henry Gunst).
This is now changing, with thanks to didge for the information:
I have been able to use the Java Media Frameworks to play sounds on my SL5500. Here are instructions:
Using JMF2.1.1b (the cross-platform version) to play .wav files on the Zaurus can be achieved by doing the following:
Create your own custom.jar (using JMFCustomizer w/ jdk1.4). Check the following items:
* Media Source: Media Files, RTP Receive
* Media Sink: Play
* Optional Component: Player bean
* Protocol: file, rtp
* Source Media Formats: Wav
* Decoder/Audio Decoders: none
* Decoder/Video Decoders: none
* Encoder/Audio Encoders: none
* Decoder/Video Encoders: none
* DePacketizer/Audio DePacketizers: none
* DePacketizer/Video DePacketizers: none
* Packetizer/Audio Packetizer: PRTP_MP3/2
* Packetizer/Video Packetizer: none
* Audio Renderer: SunAudio
* Video Renderer: none
Make sure that custom.jar and jmf.properties are located in your classpath. Additionally, you will need to start Jeode with the following arguments:
* -Djeode.evm.memory.overallSize=5m
* -bootclasspath \#SYSTEM\#:$CLASSPATH
The first increase the memory for jeode. The second ensures that the JMF custom.jar is loaded correctly. #SYSTEM# is a standin for Jeode's class libraries and the \s ensure that the shell does not consume the #s before evm gets the argument.
Back to top
|
· Any caveats or things I should watch out for?
- There are a few things to watch out for when developing or releasing for the Zaurus...
* Watch that ipk filename! It should be all lowercase and follow the naming conventions that ipkg-build warns you about.
* Images in memory are in 16bpp... bear that in mind when loading them for display. Use tiling and progressive loading to save on memory as images such as (one screen full) 320x240x16bpp = 153kb, (digital camera resolution) 1600x1200x16bpp = 3,840kb!
* Ensure that the control file in an ipk has the all the required fields, it won't show up otherwise!
* Use unix newline characters to terminate lines in control/.desktop/script files! (unix='\n', windows='\n\r') (thanks to Ralph Curtis)
Back to top
|
· What class libraries are available for the Zaurus?
- There are a few class libraries available for the Zaurus, and indeed for PersonalJava and J2ME. As a rule of thumb, the majority of Java 1.1 libraries will work without problem - this is of course not taking performance or size into consideration.
Lightweight AWT GUI toolkits (or why be stuck with AWT?)
* Thinlets (~24k, slow, attractive)
* ICEToolkit (~120k, slow)
* (~356k, fast)
* SubArctic (sluggish)
* KFC (~570k, fast)
* Zaval lwvcl (~130k, fast)
XML Parsers (or why make do with properties files?)
* kXML
* nanoXML
* microParser
* TinyXML4J
* Xparse-J
* XMLtp
* MinML
* MinML2
* ASXMLP
* TinyXML
Databases (or why settle for flat files?)
* Hypersonic SQL aka hsqldb (~110k, Java1.1/1.2, JDBC)
* SQLite (native ODBC bindings)
Cryptography (or why keep things simple?)
* LBC Crypto library
Back to top
|
· Problems with java.util.Date & Co.
- I recently got some questions regarding this, and here are some snippets from the ZaurusZone forums, from the user kevinlong - when the forums are back online, I'll also provide a direct link:
Posted: April 21 2002,19:21
It appears there maybe a problem accessing the time on the device. I've tried using both the Date() and the GregorianCalendar() classes.
This problem appears to be dependent on which city you select. For example, if you select Chicago or Los Angeles, the time appears to return correctly. However, if you select a city such as Kansas City, Oslo, Hong Kong, the time returned is the GMT time instead of the local time. In other words, the GMT time and local time are the same. When you query the time zone offset, it is 0.
I should note that the time always appears correctly in the sytem tray on the device.
Any ideas?
Posted: April 25 2002,03:19
I have been exchanging emails with Sharp (Japan). They have located the problem in the Insignia code. They are waiting on a fix or work around from Insignia.
In short, Java supports a much smaller list of cities than the Zaurus. When a city isn't found, it defaults to GMT for the time zone. Oooops!
I will post an update when I get a final response from Sharp and Insignia.
Posted: May 11 2002,23:58
I have heard back from Sharp regarding this problem. Insignia has stated they only support the following cities:
Africa/Casablanca Europe/Paris Africa/Cairo Asia/Riyadh
Asia/Tehran Asia/Yerevan Asia/Karachi Asia/Calcutta
Asia/Dacca Asia/Bangkok Asia/Shanghai Asia/Tokyo
Australia/Darwin Australia/Sydney Pacific/Guadalcanal Pacific/Fiji
Pacific/Apia Pacific/Honolulu America/Anchorage America/Los_Angeles
America/Denver America/Chicago America/New_York America/Caracas
America/St_Johns America/Buenos_Aires America/Sao_Paulo Atlantic/Cape_Verde
America/Costa_Rica Asia/Beirut Africa/Johannesburg Asia/Jerusalem
Europe/Moscow Asia/Vladivostok Australia/Hobart
Sharp has told me that Insignia does not plan to fix it. Even though they are under contract to Sharp, Sharp is not going to press Insignia to fix it.
If you would like this fixed, I would recommend that email is sent to both Sharp and Insignia. The developer support email for Sharp is . I could not find a support email for Insignia.
Hopefully, if enough people complain, they will get this problem fixed.
I agree that this is an issue that should be resolved. The Zaurus is after all an international device.
Back to top
|
· Can I learn Java on the Zaurus?
- Like all things, this is of course possible BUT:
One thing I'd like to make clear is that I don't think any PDA is suitable for learning Java (and quite likely other languages).
You need a flexible environment and be able to debug, type and browse documentation easily and fast. You won't be able to do all that on a PDA.
The Java tutorial at Sun isn't a 400-page book, it has valid examples for you to work with and very good explanations, as well as instructions on getting Java working on the desktop OS of your choice: http://java.sun.com/docs/books/tutorial/index.html
Java on the Zaurus is still pretty much stuck at version 1.1, this means that once you've learnt the Java syntax, get hold of a 1.1 Java sdk and use this for development on your desktop. It's of course possible to use later versions for this, but doing so may lead to more headaches further on.
I, like most others, do my Java development on the desktop in any case - the compiled code will (should) run without modification on the Zaurus if you work within the Java 1.1 specs. So there isn't a dire need for tools for use on the Zaurus. This is not to say there aren't any - there are quite a few: 2 compilers, 2 virtual machines (2 more on the way), 3 IDEs and countless class libraries that work perfectly fine on the small form factor.
So with regards to development tools for use on the Z, I'd say hold on, learn Java first :-)
I heartily recommend the #java channel on irc.freenode.net for help with learning Java, make sure you've read the Java tutorial first though - you'll get flak if you don't ;-)
Back to top
|
|
|
|
 |