|
|
Hello,
is this a known problem with inner classes?
Program works fine when compiled (modulo minor AWT issues), but gij
complains about IllegalAccessErrors.
---
Sourcecode attached. No condensed testcase yet, as I am still
re-working this into a GCJ AWT demo. A simple interactive calculator
based on a JavaCC grammar; original version used with Swing GUI
as an applet. (Not everybody has or likes bc). Usage: start application,
then type expressions into the bottom textfield, e.g.
5 - (4 * 3)
x = 42
y = exp( 1.3 ) + x
z = sqrt( sin( pi/2 ))
... (use cursor-up/down for command history)
Reproducing the problem:
tar xzvf calc.tgz
gcj -C calc/*.java
gcj -o calc.exe --main=calc.AWTCalculator calc/*.java
./calc.exe - works, press 'execute' button
gij calc.AWTCalculator - fails, press 'execute' button
java.lang.IllegalAccessError: calc.AXP$FUNC1: calc.AXP.func1Table
at calc.AXP$FUNC1.lookup (AXP.java:301)
at calc.AXP$FUNC1.<init> (AXP.java:296)
at calc.AXP.createFunc1 (AXP.java:553)
at calc.AXP.function (AXP.java:911)
at calc.AXP.element (AXP.java:875)
at calc.AXP.unary (AXP.java:860)
at calc.AXP.exp (AXP.java:840)
at calc.AXP.term (AXP.java:815)
at calc.AXP.sum (AXP.java:803)
at calc.AXP.logical (AXP.java:770)
at calc.AXP.assignment (AXP.java:760)
at calc.AXP.one_line (AXP.java:734)
at calc.AXP.parse (AXP.java:113)
at calc.AWTCalculator.executeCommand (AWTCalculator.java:199)
gcj --version
gcj (GCC) 4.1.0 20050424 (experimental)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gij --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.0 20050424 (experimental)
- Norman
|
|