How to compile these code by gcj?

Discussion in 'Java' started by Mike Mike, Jun 2, 2004.

  1. Mike Mike

    Mike Mike Guest

    hi
    I met some trouble!
    Is there anyone can tell me how to compile these code with gcj?
    Thanks

    import java.applet.*;
    import java.awt.*;

    /**
    * The HelloWorld class implements an applet that
    * simply displays "Hello World!".
    */
    public class HelloWorld extends Applet{
    public void paint(Graphics g){
    g.drawString("Hello World1",50,25);//Display "Hello World"
    }
    }

    ---------------------------------------------BY MIKE
     
    Mike Mike, Jun 2, 2004
    #1
    1. Advertising

  2. Mike Mike

    Mike Guest

    In article <c9ksds$22gf$99.com>, Mike Mike wrote:
    > hi
    > I met some trouble!
    > Is there anyone can tell me how to compile these code with gcj?
    > Thanks
    >
    > import java.applet.*;
    > import java.awt.*;
    >
    > /**
    > * The HelloWorld class implements an applet that
    > * simply displays "Hello World!".
    > */
    > public class HelloWorld extends Applet{
    > public void paint(Graphics g){
    > g.drawString("Hello World1",50,25);//Display "Hello World"
    > }
    > }
    >
    > ---------------------------------------------BY MIKE
    >


    Since this code is an applet and gcj compiles to native
    machine code, then using gcj for this purpose is not right.
    If you want to compile a stand-alone application with gcj,
    that would be fine.

    public class HelloWorld {
    public static void main(String args[]) {
    System.out.println(args[0]);
    }
    }
     
    Mike, Jun 2, 2004
    #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. g
    Replies:
    6
    Views:
    338
    S.A. Samokhodkin
    Aug 26, 2003
  2. KevJohnP

    GCJ Problem

    KevJohnP, Oct 31, 2003, in forum: Java
    Replies:
    0
    Views:
    622
    KevJohnP
    Oct 31, 2003
  3. John
    Replies:
    0
    Views:
    409
  4. Markus Dehmann

    GCJ speed? compile RCP apps?

    Markus Dehmann, Nov 8, 2004, in forum: Java
    Replies:
    1
    Views:
    756
    Jesper Nordenberg
    Nov 8, 2004
  5. Nagaraj
    Replies:
    1
    Views:
    924
    Lionel B
    Mar 1, 2007
Loading...

Share This Page