help me to compile it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pralu
    New Member
    • Mar 2008
    • 34

    help me to compile it

    [code=java]public interface IMain
    {
    public class Main
    {
    public static void main(String [] args)
    {
    System.out.prin tln("The main is defined inside an
    Interface ");
    }
    }
    }
    [/code]

    compile the program using javac.
    run the program by typing java IMain$Main.
    -----------------------------------------------------------------------------------------------------------
    When you post your reply see the legend on the right of your edit window;
    it explains how to use the code tags. Don't use the 'b' tag, use the 'code' tag
    instead (see above for the result).

    kind regards,

    Jos
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    So, what's the problem?

    Greetings,
    Nepomuk

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by pralu
      public interface IMain
      {
      public class Main
      {
      public static void main(String [] args)
      {
      System.out.prin tln("The main is defined inside an
      Interface ");
      }
      }
      }

      compile the program using javac.
      run the program by typing java IMain$Main .
      What is the problem then?

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by nepomuk
        So, what's the problem?

        Greetings,
        Nepomuk
        Spent some time in the wild west training your fingers?

        Comment

        • Nepomuk
          Recognized Expert Specialist
          • Aug 2007
          • 3111

          #5
          Originally posted by r035198x
          Spent some time in the wild west training your fingers?
          Nope, spent some time in a place so cold, my fingers are really freezing.
          Oh, and my Laptop is broken, which makes life a bit more difficult... Still have to take care of that.

          Greetings,
          Nepomuk

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by nepomuk
            Nope, spent some time in a place so cold, my fingers are really freezing.
            Oh, and my Laptop is broken, which makes life a bit more difficult... Still have to take care of that.

            Greetings,
            Nepomuk
            I didn't know laptops could freeze? Nevertheless its insane to go and sit out in
            the cold while playing with your laptop.

            kind regards,

            Jos ;-)

            Comment

            • pralu
              New Member
              • Mar 2008
              • 34

              #7
              Originally posted by nepomuk
              So, what's the problem?

              Greetings,
              Nepomuk

              its giving me the error while m compiling .......

              Comment

              • lotus18
                Contributor
                • Nov 2007
                • 865

                #8
                Originally posted by pralu
                its giving me the error while m compiling .......
                So how do you compile it?

                Comment

                • r035198x
                  MVP
                  • Sep 2006
                  • 13225

                  #9
                  Originally posted by pralu
                  its giving me the error while m compiling .......
                  And it refused to tell you what the error message was?

                  Comment

                  • JosAH
                    Recognized Expert MVP
                    • Mar 2007
                    • 11453

                    #10
                    Originally posted by r035198x
                    And it refused to tell you what the error message was?
                    Yep, he must be using the harshjavac compiler, it only tells you this:

                    Code:
                    $harshjavac MyClass.java
                    complaint: I saw an error sh*t for brains: I'm out of here
                    and I didn't like the code much either: source file removed.
                    So there.
                    $
                    kind regards,

                    Jos ;-)

                    Comment

                    Working...