Java version & Applet

Discussion in 'Java' started by pkoerner@online.de, Mar 16, 2007.

  1. Guest

    Hi

    I got some questions dealing with java-version in junction with
    Applets.
    When i compile an Applet with my jdk1.6 it can only be used when the
    client machine also has at least version 1.6, is that correct?

    Using the -target and -source-Switches I can force the compiler to
    create a classfile matching a lower version, vor example [1] says -
    source 1.2 -target 1.1 is the recommended setting for applets. This
    disables features like generics, what would be okay, but how is it
    about using packages like javax.swing.* od javax.xml.bind.*, which are
    not part of i.e. jre1.1.

    It seems that an Applet (or an Application either) would run without
    having these classfiles present. So i have to pack the needes
    classfiles out of the jars of my jre into my own jar-file.

    So, if i want to write an Applet, which target version is really
    recommended today (1.1 seems some kind of.. too old?) and how can I
    find out which packages i have to pack into the jar.

    Peter
     
    , Mar 16, 2007
    #1
    1. Advertising

  2. wrote:
    > Hi
    >
    > I got some questions dealing with java-version in junction with
    > Applets.
    > When i compile an Applet with my jdk1.6 it can only be used when the
    > client machine also has at least version 1.6, is that correct?
    >
    > Using the -target and -source-Switches I can force the compiler to
    > create a classfile matching a lower version, vor example [1] says -
    > source 1.2 -target 1.1 is the recommended setting for applets. This
    > disables features like generics, what would be okay, but how is it
    > about using packages like javax.swing.* od javax.xml.bind.*, which are
    > not part of i.e. jre1.1.
    >
    > It seems that an Applet (or an Application either) would run without
    > having these classfiles present. So i have to pack the needes
    > classfiles out of the jars of my jre into my own jar-file.
    >
    > So, if i want to write an Applet, which target version is really
    > recommended today (1.1 seems some kind of.. too old?) and how can I
    > find out which packages i have to pack into the jar.
    >
    > Peter
    >


    Since 1.3 has reached 'end of life' you will need to use version 1.4.
    Just download the 1.4.2_?? JDK and write your Applets with that. The
    -source and -target do not prevent you from using code that is from a
    later version. They just create class files that are compatible with
    the earlier version.

    --

    Knute Johnson
    email s/nospam/knute/
     
    Knute Johnson, Mar 16, 2007
    #2
    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. Krista
    Replies:
    3
    Views:
    2,364
    Andrew Thompson
    Sep 15, 2004
  2. V Green
    Replies:
    0
    Views:
    928
    V Green
    Feb 5, 2008
  3. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,040
    PA Bear [MS MVP]
    Feb 5, 2008
  4. MowGreen [MVP]
    Replies:
    5
    Views:
    2,083
    PA Bear [MS MVP]
    Feb 9, 2008
  5. Krist
    Replies:
    4
    Views:
    644
    Arne Vajhøj
    May 6, 2010
Loading...

Share This Page