Loading ...
Sorry, an error occurred while loading the content.
 

RE: [gelide] Re: BUG

Expand Messages
  • donghu shen
    hi, thank you for your email. Happy new year!! Hart, Allan Mathew wrote: I don t believe that you can import a class that s not in a
    Message 1 of 4 , Jan 1, 2005
      hi,
         thank you for your email.
      Happy new year!!

      "Hart, Allan Mathew" <allan.hart@...> wrote:

      I don't believe that you can import a class that's not in a package.   I think this has been true since about 1.4.x or so.  You might try putting A in a package, say, mypackage, and then use

      import mypackage.*;

      Regards,
      Allan M. Hart
      ________________________________

      From: ianshef [mailto:ishef@...]
      Sent: Sun 11/28/2004 9:56 PM
      To: gelide@yahoogroups.com
      Subject: [gelide] Re: BUG



      --- In gelide@yahoogroups.com, "dudducat" <dudducat@l...> wrote:
      >
      >
      > I have to compile a project with 2 classes
      >
      > A
      > and
      > B.C
      >
      > where B is a package obviously.
      >
      > if I put in C an import like:
      >
      > import A;
      >
      > I can't compile ... GEL (RC40) says 00024: '.' expected
      > Why does it expect a dot ? It's not a requirement in java spec. It's
      > a bug.
      > If someone can please fix it. I have to compile with eclipse to solve
      > the problem.
      >
      > Bye,
      >   Stefano

      Stefano -
      I don't know enough about importing from the unnamed package to say
      whether this is a bug or not.  However, if it is a bug, the bug is not
      in Gel.  Gel does not compile, it just uses whatever compiler or
      compilers you have set up to be used by Gel.

      Two notes:
      1)  The Java Language Specification in 7.4.2 says "For this reason, it
      is strongly recommended that compilation units of named packages never
      import types from unnamed packages. It is also recommended that any
      type declared in an unnamed package not be declared public, to keep
      them from accidentally being imported by a named package."

      2)  At URL  http://bdn.borland.com/article/0%2C1410%2C29710%2C00.html
      it is claimed that "Importing a packageless class is illegal according
      to the Java Language Specification (JLS) and always has been."

      You may want to rethink the structure of your program.
      Good Luck!







      Yahoo! Groups Sponsor     
      ADVERTISEMENT
      click here <http://us.ard.yahoo.com/SIG=129c9nepe/M=298184.5639630.6699735.3001176/D=groups/S=1705006905:HM/EXP=1101786973/A=2434970/R=0/SIG=11edksnhv/*http://www.netflix.com/Default?mqso=60185402>      
           

      ________________________________

      Yahoo! Groups Links


      *      To visit your group on the web, go to:
            http://groups.yahoo.com/group/gelide/
             
      *      To unsubscribe from this group, send an email to:
            gelide-unsubscribe@yahoogroups.com <mailto:gelide-unsubscribe@yahoogroups.com?subject=Unsubscribe>
             
      *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .








      Do You Yahoo!?
      注册世界一流品质的雅虎免费电邮

    Your message has been successfully submitted and would be delivered to recipients shortly.