public inbox for
help / color / mirror / Atom feed
Subject: java/10894: Valid import statements are rejected.
Date: Wed, 21 May 2003 03:46:00 -0000	[thread overview]
Message-ID: <> (raw)

>Number:         10894
>Category:       java
>Synopsis:       Valid import statements are rejected.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed May 21 03:46:01 UTC 2003
>Originator:     Jonathan Brandmeyer
>Release:        3.3
Debian Sid, x86:
Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/specs
Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.3 (Debian)
The following code fails to compile, but is valid according to the public Sun Java specs, section 7.5.2 as found at

"import java.lang.Math.*" in any compilation unit fails with this output:
/usr/lib/gcc-lib/i386-linux/3.3/jc1 -quiet -dumpbase -auxbase-strip NONE -g1 -version -fsyntax-only
-femit-class-files -o /dev/null
GNU Java version 3.3 (Debian) (i386-linux)
        compiled by GNU C version 3.3 (Debian).
GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48342
Class path starts here:
    /usr/share/java/libgcj-3.3.jar/ (system) (zip) error: Can't find default package `java.lang.Math'. Check
the CLASSPATH environment variable and the access to the archives
1 error
import java.lang.Math.*;

public class Test {
	public static void main( String[] args) {
		System.out.println( "this is a test");

Compile with "gcj -v -C"
Don't use statements of the form "import java.lang".anything.  They are superfluous.

             reply	other threads:[~2003-05-21  3:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-21  3:46 jbrandmeyer [this message]
2003-05-21  3:57 Andrew Pinski
2003-05-21  4:36 Jonathan Brandmeyer
2003-05-21  4:46 Andrew Pinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).