Matching compiled version to JVM version

Discussion in 'Java' started by marcus, Jun 6, 2004.

  1. marcus

    marcus Guest

    We all know that "Compile once, run anywhere" is a fantasy, because
    there are too many cases where the version of the JVM cannot be known at
    compile time. I was considering somewhat of a paradigm shift in the
    concept of JVM versioning vs compiler versioning, and would like to know
    if this has been discussed before.

    Consider a language addition, such as Calander object or Event
    Listeners, which caused pretty major changes between 1.1 and 1.2. I am
    imagining it would be possible to include a compiler directive, similar
    to "-target 1.1.8" which would cause the compiler to include alternative
    code to perform the additional functions under older JVM's, and use a
    run-time test to determine which code to use. In this way many
    additional language features would be accessable, albiet in a possibly
    less efficient form, to an older JVM. I am imagining a sort of
    compiler-generated package of "1.1.8 extensions" which would contain the
    additional layer of indirection.

    a) Not every feature could be made accessably this way -- what ratio
    could and what are the benefits?

    b) Alternative code could be written once and sanitized, rather than
    version-creep work-arounds being hacked out under deadlines by armies of
    coders around the world.

    c) Could scope and security issues be reasonably addressed without
    rebuilding the entire package hierarchy?

    d) With modern distribution technologies code bloat is not so worrisome
    to me as OS bloat. The code might be bigger, but hardly slower except
    in the case where the JVM would be slower anyway.

    Thoughts?
    marcus, Jun 6, 2004
    #1
    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. Kevin Hooke

    Re: Handling both MS JVM and Sun JVM

    Kevin Hooke, Aug 26, 2003, in forum: Java
    Replies:
    2
    Views:
    873
  2. Lasse
    Replies:
    1
    Views:
    698
    Jon A. Cruz
    Jan 5, 2004
  3. Young-Jin Lee

    MS JVM and Sun JVM problem

    Young-Jin Lee, Jan 20, 2004, in forum: Java
    Replies:
    3
    Views:
    573
    Mickey Segal
    Jan 21, 2004
  4. Klaus Schneider
    Replies:
    1
    Views:
    540
    Rolf Magnus
    Dec 2, 2004
  5. lander
    Replies:
    5
    Views:
    588
    bruce barker
    Mar 5, 2008
Loading...

Share This Page