A
Andrew Thompson
I have struck a problem with my on-line compiler
<http://www.physci.org/javac.jsp?bcp=MS>
that has me stumped. It was first revealed in
this conversation on c.l.j.gui.
<http://google.com/groups?th=9ff93a6bfc7ff231>
Long story short, when compiling against the
1.1 VM, the On-Line compiler will reject
_some_ code that uses post 1.1 classes,
but not _all_ code.
Case in point..
<sscce>
import java.awt.*;
public class Graphic2Din1_1 extends Frame {
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g.create();
double d = 1.238765d;
g2d.rotate(d);
}
}
</sscce>
G2D was not defined until 1.2, but the on-line
compiler will happily report the compile was a
success.
OTOH, if you import the CardLayout code,
which uses Color constants introduced in 1.4,
the code will _not_ compile.
** Even more confusingly, my version at
home will correctly reject both. **
Based on that, I uploaded all the files again,
...with the same result!?! The home version correctly
rejects the code, the on-line version accepts it.
Now I have put a 'out.print' statement at the top
that tells me the rt.jar against which it is pointing
the -bootclasspath. It is, as it should be, 'rt1_1_4.jar'
(I put them all in the same directory, so had to
give each a unique name)
I checked the size of the rt1_1_4.jar on the site
'5615Kb', the local jar is reporting 5616,
so I am confident I have the right jar, since
there is not other rt.jar within 2 Meg of
that size.
Does anyone have any ideas as to what I have
overlooked, or further tests I might do, to
help narrow the problem down?
<http://www.physci.org/javac.jsp?bcp=MS>
that has me stumped. It was first revealed in
this conversation on c.l.j.gui.
<http://google.com/groups?th=9ff93a6bfc7ff231>
Long story short, when compiling against the
1.1 VM, the On-Line compiler will reject
_some_ code that uses post 1.1 classes,
but not _all_ code.
Case in point..
<sscce>
import java.awt.*;
public class Graphic2Din1_1 extends Frame {
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g.create();
double d = 1.238765d;
g2d.rotate(d);
}
}
</sscce>
G2D was not defined until 1.2, but the on-line
compiler will happily report the compile was a
success.
OTOH, if you import the CardLayout code,
which uses Color constants introduced in 1.4,
the code will _not_ compile.
** Even more confusingly, my version at
home will correctly reject both. **
Based on that, I uploaded all the files again,
...with the same result!?! The home version correctly
rejects the code, the on-line version accepts it.
Now I have put a 'out.print' statement at the top
that tells me the rt.jar against which it is pointing
the -bootclasspath. It is, as it should be, 'rt1_1_4.jar'
(I put them all in the same directory, so had to
give each a unique name)
I checked the size of the rt1_1_4.jar on the site
'5615Kb', the local jar is reporting 5616,
so I am confident I have the right jar, since
there is not other rt.jar within 2 Meg of
that size.
Does anyone have any ideas as to what I have
overlooked, or further tests I might do, to
help narrow the problem down?