java for different platforms

Discussion in 'Java' started by whurc@iprimus.com.au, Feb 19, 2007.

  1. Guest

    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
     
    , Feb 19, 2007
    #1
    1. Advertising

  2. Guest

    On Feb 19, 12:44 pm, wrote:
    > 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
     
    , Feb 19, 2007
    #2
    1. Advertising

  3. Guest

    On 19 Feb., 11:44, wrote:
    > 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.
     
    , Feb 19, 2007
    #3
  4. wrote:
    > 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
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Feb 19, 2007
    #4
  5. John Guest

    wrote:
    > On Feb 19, 12:44 pm, wrote:
    >
    >>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
    >

    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
     
    John, Feb 20, 2007
    #5
  6. John Guest

    John wrote:
    > wrote:
    >
    >> On Feb 19, 12:44 pm, wrote:
    >>
    >>> 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
    >>

    > 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
     
    John, Feb 20, 2007
    #6
  7. John 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
    >
    > 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.
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Feb 20, 2007
    #7
  8. John T Guest

    "Arne Vajhøj" <> wrote in message
    news:45da5245$0$90271$...
    > 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 :)
     
    John T, Feb 20, 2007
    #8
  9. John T wrote:
    > 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
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Feb 21, 2007
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. z. f.
    Replies:
    0
    Views:
    344
    z. f.
    Apr 19, 2004
  2. Peter the Swede
    Replies:
    10
    Views:
    18,317
    Roedy Green
    Nov 15, 2003
  3. Eqbal
    Replies:
    3
    Views:
    2,231
    Roedy Green
    Oct 18, 2005
  4. Qiangning Hong
    Replies:
    12
    Views:
    708
    Grant Edwards
    Jul 12, 2006
  5. Kerry, Richard
    Replies:
    2
    Views:
    406
    Piet van Oostrum
    Jul 13, 2006
Loading...

Share This Page