Re: java for different platforms
- From: John <printdude1968@xxxxxxxxx>
- Date: Tue, 20 Feb 2007 01:06:35 GMT
Boaz.Jan@xxxxxxxxx wrote:
On Feb 19, 12:44 pm, w...@xxxxxxxxxxxxxx wrote:Without desiring to start a debate (as my posts sometimes do) I think that "write once run anywhere" is not 100% accurate. A better wording should be "write once *correctly*, run anywhere". For example, in the past couple of weeks, there was a rather interesting discussion thread in c.l.j.h which talked about the difference in the way newline characters were coded in Java. As it turns out, different operating systems handle this differently. Andrew Thompson pointed out
I'm just getting started with java programming and would like to buy a
PDA. If anyone could please help me with some advice, I would like to
write some applications for a PDA. Which operating system is easier to
write java code for, windows mobile 5 or palm os and what api docs
would i need to use. I am using Jcreater at the moment as guided from
the book Beginning programming with java for dummies.
Wayne
the entire thing about java is that it doesnt matter what OS you're
using...
the code is the same. "write once run anywhere".
read the j2me tutorial at java.sun.com
or get a j2me book
j2me = java 2 mobile edition
System.getProperty( "line.separator" );
*Here is the actual link: http://shorterlink.com/?WUMPTW*
which is something that I didn't know about.
So, a java program coded on Windows with the windows system of dealing with newlines will crap out on Linux or other platforms which deal with it differently unless it is coded correctly by consulting the System.getProperty method. For a newbie like me, this was a very important thing to realize. If one is to write code that is truly portable, one must never assume that something is handled the same way on all platforms, and code to handle different operating systems, if the code is going to be used on multiple platforms.
JMTC
.
- Follow-Ups:
- Re: java for different platforms
- From: Arne Vajhøj
- Re: java for different platforms
- From: John
- Re: java for different platforms
- References:
- java for different platforms
- From: whurc
- Re: java for different platforms
- From: Boaz.Jan@xxxxxxxxx
- java for different platforms
- Prev by Date: Re: How to check variables for uniqueness ?
- Next by Date: Re: java for different platforms
- Previous by thread: Re: java for different platforms
- Next by thread: Re: java for different platforms
- Index(es):
Relevant Pages
|
|