public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/13006] New: NoSuchMethodError thrown at runtime
@ 2003-11-11 9:04 s28patel at student dot math dot uwaterloo dot ca
2003-11-18 5:47 ` [Bug libgcj/13006] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: s28patel at student dot math dot uwaterloo dot ca @ 2003-11-11 9:04 UTC (permalink / raw)
To: gcc-bugs
**********Summary:
The following code throws a runtime error when run, yet runs fine when
compiled it with IBM's jikes compiler. I think there is both a
compiler and library error.
**********Platform:
Cygwin on Windows XP
**********Source code (test.java):
import javax.swing.BoxLayout;
import javax.swing.JPanel;
class test {
public static void main(String argv[]) {
BoxLayout b = new BoxLayout(new JPanel(), 0);
}
}
**********Runtime error:
java.lang.NoSuchMethodError:
javax.swing.BoxLayout.<init>(Ljavax/swing/JComponent;I)V
at test.main(test.java:5)
Exception in thread "main"
**********Details and my experimentation:
Compile command and compiler output follow.
The only reason I created the JPanel object is because the BoxLayout
constructor requires a JPanel object.
When compiling with jikes, I first compiled using Sun's java's runtime
jar file (lib/rt.jar in my java runtime directory), and it worked
fine. I then experimented by using gcc's classes
(/usr/share/java/libgcj-3.3.1.jar) with jikes, and got the following
"semantic error" message:
The constructor "BoxLayout(javax.swing.JComponent $1, int $2);" in
type "javax.swing.BoxLayout" has default access and is not accessible
here.
Browsing the current CVS source in directory
gcc/libjava/javax/swing/BoxLayout.java confirms the constructors for
BoxLayout have no access modifiers (no public/private designation).
I think the gcj compiler ought to provide an error message like jikes
does when trying to call a constructor that cannot be accessed.
It seems to me gcj is outputing code to call an inaccessible
constructor. When I run the class with gij, it seems to hang... but
when I used another class instead of BoxLayout
(e.g. java.awt.GridLayout) the code ran fine.
**********Compile command:
gcj -v -save-temps -C test.java -Wall
**********Compiler output:
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /netrel/src/gcc-3.3.1-2/configure
--enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posix
--with-system-zlib --enable-nls --without-included-gettext --enable-interpreter
--enable-sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared
--build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.3.1 (cygming special)
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/jc1.exe test.java -quiet -dumpbase
test.java -auxbase-strip NONE -g1 -Wall -version -fsyntax-only
-femit-class-files -o test
GNU Java version 3.3.1 (cygming special) (i686-pc-cygwin)
compiled by GNU C version 3.3.1 (cygming special).
GGC heuristics: --param ggc-min-expand=46 --param ggc-min-heapsize=31678
Class path starts here:
./
/usr/share/java/libgcj-3.3.1.jar/ (system) (zip)
**********thank you! (end)
--
Summary: NoSuchMethodError thrown at runtime
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s28patel at student dot math dot uwaterloo dot ca
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-cygwin
GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13006
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcj/13006] NoSuchMethodError thrown at runtime
2003-11-11 9:04 [Bug java/13006] New: NoSuchMethodError thrown at runtime s28patel at student dot math dot uwaterloo dot ca
@ 2003-11-18 5:47 ` pinskia at gcc dot gnu dot org
2003-12-30 17:21 ` pinskia at gcc dot gnu dot org
2004-01-04 2:42 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-18 5:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-18 05:47 -------
Confirmed, will file a seperate bug for the front-end problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|java |libgcj
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-18 05:47:06
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13006
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcj/13006] NoSuchMethodError thrown at runtime
2003-11-11 9:04 [Bug java/13006] New: NoSuchMethodError thrown at runtime s28patel at student dot math dot uwaterloo dot ca
2003-11-18 5:47 ` [Bug libgcj/13006] " pinskia at gcc dot gnu dot org
@ 2003-12-30 17:21 ` pinskia at gcc dot gnu dot org
2004-01-04 2:42 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-30 17:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-30 17:01 -------
The front-end bug is PR 13098 and this bug has been fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13006
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcj/13006] NoSuchMethodError thrown at runtime
2003-11-11 9:04 [Bug java/13006] New: NoSuchMethodError thrown at runtime s28patel at student dot math dot uwaterloo dot ca
2003-11-18 5:47 ` [Bug libgcj/13006] " pinskia at gcc dot gnu dot org
2003-12-30 17:21 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 2:42 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-04 2:42 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13006
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-04 2:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-11 9:04 [Bug java/13006] New: NoSuchMethodError thrown at runtime s28patel at student dot math dot uwaterloo dot ca
2003-11-18 5:47 ` [Bug libgcj/13006] " pinskia at gcc dot gnu dot org
2003-12-30 17:21 ` pinskia at gcc dot gnu dot org
2004-01-04 2:42 ` pinskia at gcc dot gnu dot org
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).