java for different platforms

W

whurc

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
 
B

Boaz.Jan

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
 
A

a249

I'm just getting started with java programming and would like to buy a PDA.

Java on PDAs, like Java on the desktop, is largely dead. Many PDA
producers no longer offer any kind of Java implementation for their
PDAs. Those who still have a Java VM usually haven't updated it in
years. ISVs offering VMs to individuals are largely unheared of, and
the few remaining ones who aren't alread bancrupt typically only sell
in bulk to companies.

What you can get are mobile phones with reasonable, up to date Java
VMs of the Java ME kind. If you want Java SE, you almost exclusively
get that on desktop and server computers with Window, Mac OS X
(typically some release behind), Linux, Solaris and other Unix
version.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

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.

Java obvious does not care about Windows Mobile versus
Palm OS.

You should be aware that PDA's usually does not come with
J2ME and that J2ME implementations cost money.

If you can live with a non-J2ME compliant Java then
look at http://www.ewesoft.com/ !

Arne
 
J

John

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
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

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
 
J

John

John said:
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

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

Stupid asterisks....

http://shorterlink.com/?WUMPTW
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

John said:
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

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.

It may have been news to you, but I do not think it is possible to
create a language with practical enough to be used for real world
programming which prevents programmers of writing non portable code.
If you can specify a filename you can use platform specific syntax
for that. The only thing a language can do is to give the programmer
the necessary tools to write platform independent code.

Arne

PS: System.getProperty( "line.separator" ) should not be used much -
normally you would choose IO classes with builtin line support
for reading or writing files with line structure.
 
J

John T

Arne Vajhøj said:
John wrote:
It may have been news to you, but I do not think it is possible to
create a language with practical enough to be used for real world
programming which prevents programmers of writing non portable code.
Not sure what you are saying here...

Heres' an idea... what if the JVM were intelligent enough to take a command,
like say

String a = new String();
a="nnn";
a=a+os.NEW_LINE_CHARACTER;

and automatically convert the NEW_LINE_CHARACTER into the appropriate code
for the OS on which the JVM is running.
PS: System.getProperty( "line.separator" ) should not be used much -
normally you would choose IO classes with builtin line support
for reading or writing files with line structure.

I've never actually used this myself, I was just quoting what someone else
said :)
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

John said:
Heres' an idea... what if the JVM were intelligent enough to take a command,
like say

String a = new String();
a="nnn";

String a = "nnn";

would look much better.
a=a+os.NEW_LINE_CHARACTER;

and automatically convert the NEW_LINE_CHARACTER into the appropriate code
for the OS on which the JVM is running.

It could.

Do you really think that:

a = a + os.NEW_LINE_CHARACTER;

is so much nicer than:

a = a + System.getProperty("line.separator");

?

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top