public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/10894: Valid import statements are rejected.
@ 2003-05-21 4:36 Jonathan Brandmeyer
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Brandmeyer @ 2003-05-21 4:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/10894; it has been noted by GNATS.
From: Jonathan Brandmeyer <jbrandmeyer@earthlink.net>
To: Andrew Pinski <pinskia@physics.uc.edu>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: java/10894: Valid import statements are rejected.
Date: 21 May 2003 00:29:28 -0400
Not true. As posted in the gcj -v output, those classes are on the
CLASSPATH. In fact, commenting out the offending line 'solves' the
problem. Here it is again:
jonathan@illuvatar:~/workspace/HelloWorld/116csc/2Lab$ gcj -v -C
Test.java
Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/specs
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)
/usr/lib/gcc-lib/i386-linux/3.3/jc1 Test.java -quiet -dumpbase
Test.java -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/repository/
/usr/share/java/libgcj-3.3.jar/ (system) (zip)
Test.java:1: error: Can't find default package `java.lang.Math'. Check
the CLASSPATH environment variable and the access to the archives
1 error
-Jonathan
On Tue, 2003-05-20 at 23:50, Andrew Pinski wrote:
> Looks like your CLASSPATH environment is set to something that does not
> include the gcj's classes.
>
> Thanks,
> Andrew Pinski
>
> On Tuesday, May 20, 2003, at 23:37 US/Eastern,
> jbrandmeyer@users.sourceforge.net wrote:
>
> >
> > Test.java:1: error: Can't find default package `java.lang.Math'. Check
> > the CLASSPATH environment variable and the access to the archives
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: java/10894: Valid import statements are rejected.
@ 2003-05-21 4:46 Andrew Pinski
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2003-05-21 4:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/10894; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: jbrandmeyer@users.sourceforge.net
Cc: Andrew Pinski <pinskia@physics.uc.edu>, gcc-gnats@gcc.gnu.org,
gcc-bugs@gcc.gnu.org
Subject: Re: java/10894: Valid import statements are rejected.
Date: Wed, 21 May 2003 00:40:47 -0400
You are right I should have read that link, I have not kept up with
Java (at least the language) since 1.0.2 and since class inside classes
is new for 1.1 I did not know that import was extended also.
Thanks,
Andrew Pinski
On Wednesday, May 21, 2003, at 00:29 US/Eastern, Jonathan Brandmeyer
wrote:
> Not true. As posted in the gcj -v output, those classes are on the
> CLASSPATH. In fact, commenting out the offending line 'solves' the
> problem. Here it is again:
>
> jonathan@illuvatar:~/workspace/HelloWorld/116csc/2Lab$ gcj -v -C
> Test.java
> Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/specs
> 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)
> /usr/lib/gcc-lib/i386-linux/3.3/jc1 Test.java -quiet -dumpbase
> Test.java -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/repository/
> /usr/share/java/libgcj-3.3.jar/ (system) (zip)
> Test.java:1: error: Can't find default package `java.lang.Math'. Check
> the CLASSPATH environment variable and the access to the archives
> 1 error
>
> -Jonathan
>
> On Tue, 2003-05-20 at 23:50, Andrew Pinski wrote:
>> Looks like your CLASSPATH environment is set to something that does
>> not
>> include the gcj's classes.
>>
>> Thanks,
>> Andrew Pinski
>>
>> On Tuesday, May 20, 2003, at 23:37 US/Eastern,
>> jbrandmeyer@users.sourceforge.net wrote:
>>
>>>
>>> Test.java:1: error: Can't find default package `java.lang.Math'.
>>> Check
>>> the CLASSPATH environment variable and the access to the archives
>>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: java/10894: Valid import statements are rejected.
@ 2003-05-21 3:57 Andrew Pinski
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2003-05-21 3:57 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/10894; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: jbrandmeyer@users.sourceforge.net
Cc: Andrew Pinski <pinskia@physics.uc.edu>, gcc-gnats@gcc.gnu.org,
"Gcc-Bugs@Gcc. Gnu. Org" <gcc-bugs@gcc.gnu.org>
Subject: Re: java/10894: Valid import statements are rejected.
Date: Tue, 20 May 2003 23:50:23 -0400
Looks like your CLASSPATH environment is set to something that does not
include the gcj's classes.
Thanks,
Andrew Pinski
On Tuesday, May 20, 2003, at 23:37 US/Eastern,
jbrandmeyer@users.sourceforge.net wrote:
>
> Test.java:1: error: Can't find default package `java.lang.Math'. Check
> the CLASSPATH environment variable and the access to the archives
^ permalink raw reply [flat|nested] 4+ messages in thread
* java/10894: Valid import statements are rejected.
@ 2003-05-21 3:46 jbrandmeyer
0 siblings, 0 replies; 4+ messages in thread
From: jbrandmeyer @ 2003-05-21 3:46 UTC (permalink / raw)
To: gcc-gnats
>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
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Brandmeyer
>Release: 3.3
>Organization:
>Environment:
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)
>Description:
The following code fails to compile, but is valid according to the public Sun Java specs, section 7.5.2 as found at http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html
"import java.lang.Math.*" in any compilation unit fails with this output:
/usr/lib/gcc-lib/i386-linux/3.3/jc1 Test.java -quiet -dumpbase
Test.java -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/repository/
/usr/share/java/libgcj-3.3.jar/ (system) (zip)
Test.java:1: error: Can't find default package `java.lang.Math'. Check
the CLASSPATH environment variable and the access to the archives
1 error
>How-To-Repeat:
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 Test.java"
>Fix:
Don't use statements of the form "import java.lang".anything. They are superfluous.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-05-21 4:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 4:36 java/10894: Valid import statements are rejected Jonathan Brandmeyer
-- strict thread matches above, loose matches on Subject: below --
2003-05-21 4:46 Andrew Pinski
2003-05-21 3:57 Andrew Pinski
2003-05-21 3:46 jbrandmeyer
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).