can java be used in systems software development?

Discussion in 'Java' started by John, Nov 15, 2006.

  1. John

    John Guest

    It is confusing some people told me he used Java to develop systems
    software? I thought Java is only suitable for high-level applications
    development. I guess it depends on the definitions of 'systems
    software', but my understanding is that at least it should be able to
    manipulate memory addresses like C. I am not sure, please comment and
    advice.
    John, Nov 15, 2006
    #1
    1. Advertising

  2. John wrote:
    > It is confusing some people told me he used Java to develop systems
    > software? I thought Java is only suitable for high-level applications
    > development.


    Java is not the best language for system programming. Java has an
    interface (JNI) to C. So what one can do is to do the real system work
    in C, and call the C functions from Java. You loose platform
    independence and have to deal with two languages and the JNI mechanism.

    /Thomas
    --
    The comp.lang.java.gui FAQ:
    http://gd.tuwien.ac.at/faqs/faqs-hierarchy/comp/comp.lang.java.gui/
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
    Thomas Weidenfeller, Nov 15, 2006
    #2
    1. Advertising

  3. John

    EJP Guest

    John wrote:
    > It is confusing some people told me he used Java to develop systems
    > software? ... I guess it depends on the definitions of 'systems
    > software'


    More than somewhat. Great language for writing compilers and assemblers
    and linkers, and these were systems software when I went to school ...
    If you mean device drivers and O/S components, no, because you can't
    address physical memory or registers.
    EJP, Nov 15, 2006
    #3
  4. John wrote:
    > It is confusing some people told me he used Java to develop systems
    > software? I thought Java is only suitable for high-level applications
    > development. I guess it depends on the definitions of 'systems
    > software', but my understanding is that at least it should be able to
    > manipulate memory addresses like C. I am not sure, please comment and
    > advice.
    >


    I agree that a systems language needs to be able to do arithmetic and
    turn the result into a pointer. That is needed for both memory
    management and hardware register addressing.

    It may also need to be able to turn a pointer into an integer type.

    However, I don't think it needs to be done "like C". It could be
    isolated in a special API, so that e.g. coding reviews could look for
    over-use.

    Patricia
    Patricia Shanahan, Nov 15, 2006
    #4
  5. John

    Chris Uppal Guest

    Patricia Shanahan wrote:

    > I agree that a systems language needs to be able to do arithmetic and
    > turn the result into a pointer. [...]
    >
    > However, I don't think it needs to be done "like C". It could be
    > isolated in a special API, so that e.g. coding reviews could look for
    > over-use.


    That's the approach that the IBM "Jikes Research JVM" takes.

    (That's a high-performance JVM written entirely in Java (plus a little
    assembler for bootstrapping) -- and a high-performance JVM needs a lot of
    low-level "systems-y" tricks.)

    -- chris
    Chris Uppal, Nov 15, 2006
    #5
  6. EJP wrote:
    >
    > More than somewhat. Great language for writing compilers and assemblers
    > and linkers, and these were systems software when I went to school ...
    > If you mean device drivers and O/S components, no, because you can't
    > address physical memory or registers.


    It may not be great but you can still write a little JNI to create a
    direct java.nio.ByteBuffer (or equivalent in RTSJ). For USB there are
    APIs available into low level protocols. I think the main problem is
    interfacing to operating systems not written with Java in mind.

    Tom Hawtin
    Thomas Hawtin, Nov 15, 2006
    #6
  7. John wrote:
    > It is confusing some people told me he used Java to develop systems
    > software? I thought Java is only suitable for high-level applications
    > development. I guess it depends on the definitions of 'systems
    > software', but my understanding is that at least it should be able to
    > manipulate memory addresses like C. I am not sure, please comment and
    > advice.


    Java is very well suited for databases and application servers.

    IBM has shown that most of a JVM itself can be written in Java.

    MS has shown that most of an OS can be written in C# and
    that should indicate that Java could be used as well.

    A few things can not be written in Java, but the lines
    of code would be relative small compared to the
    total size.

    Arne
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Nov 16, 2006
    #7
  8. John

    Simon Brooke Guest

    in message <>, John
    ('') wrote:

    > It is confusing some people told me he used Java to develop systems
    > software? I thought Java is only suitable for high-level applications
    > development. I guess it depends on the definitions of 'systems
    > software', but my understanding is that at least it should be able to
    > manipulate memory addresses like C. I am not sure, please comment and
    > advice.


    It depends on the architecture, doesn't it? There are hardware
    implementations of the Java processor; they run Java down on the metal and
    you can't get lower level than that. The Intel x86 architecture is not
    designed to run Java on the metal, and Java is not designed to compile
    down to x86 native code. However, there are compilers (including GCC)
    which will compile Java to x86.

    You'd almost certainly need a Java aware BIOS which appeared as an instance
    of a custom class; and you'd probably have to write that BIOS in assembler
    or possibly C. But the BIOS could be very small indeed.

    --
    (Simon Brooke) http://www.jasmine.org.uk/~simon/

    The trouble with Simon is that he only opens his mouth to change feet.
    ;; of me, by a 'friend'
    Simon Brooke, Nov 16, 2006
    #8
    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. Mike
    Replies:
    2
    Views:
    629
  2. Replies:
    2
    Views:
    791
    dar7yl
    Jan 15, 2005
  3. T-bird4real
    Replies:
    0
    Views:
    415
    T-bird4real
    Nov 1, 2006
  4. Matt
    Replies:
    56
    Views:
    1,073
    Keith Thompson
    Jun 8, 2006
  5. Casey Hawthorne
    Replies:
    1
    Views:
    713
    Arne Vajhøj
    Mar 18, 2009
Loading...

Share This Page