Interesting results...

Mason Loring Bliss mason at acheron.middleboro.ma.us
Wed Mar 20 15:54:48 PST 2002


Hello, all.

I saw the note about Klasses.jar on the list, rebuilt, and reinstalled.
That was evidently part of the problem I was seeing, as now javac comes
back with an error, as opposed to being utterly silent. Here's what I'm
seeing now:

acheron 1 /home/mason/work/java$ javac hello.java
java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]
        at java.io.PushbackReader.<init>(PushbackReader.java:32)
        at at.dms.compiler.tools.antlr.extra.InputBuffer.<init>(InputBuffer.java:68)
        at at.dms.compiler.tools.antlr.extra.InputBuffer.<init>(InputBuffer.java:81)
        at at.dms.kjc.Main.parseFile(Main.java:278)
        at at.dms.kjc.Main.run(Main.java:116)
        at at.dms.kjc.Main.compile(Main.java:68)
        at at.dms.kjc.Main.main(Main.java:59)



In case it matters, here's the hello.java file. I assume it's nothing to do
with that, in part because other javac's compile it okay.



// 40 line Java demo, Peter van der Linden

import java.awt.*;

class hello extends Frame
{
	static int x=0,y=120;	// x,y position to display message
	static int i=0;
	static int LtoR=1;	// 1->we are moving msg L-to-R, 0->top to bott.
	Font fb = new Font("TimesRoman", Font.BOLD, 36);
	String msg[] = {"Java", "Portable", "Secure", "Easy"};
	Color color[] = {Color.blue, Color.yellow, Color.green, Color.red};

	public void
	paint(Graphics g)	// gets called by the runtime library
	{
		g.setFont( fb );
		g.setColor( color[i] );
		g.drawString(msg[i],x,y);
	}

	static public void
	main(String s[]) throws Exception
	{
		hello mf = new hello();
		mf.setSize(220,200);
		int pixelsPerLine=200, totalLines=4;
		mf.setVisible(true);

		for (int j=0;j<pixelsPerLine*totalLines; j++) {
			Thread.sleep(25);
			mf.repaint();
			if (LtoR==1) {
				if ( (x+=3) < 200) continue;
				i = ++i % 4;		// move index to next
							// msg/color
				x=50; y=0; LtoR=0;	// move msg top to
							// bott next time
			} else {
				if ( (y+=3) < 200)
					continue;
				i = ++i % 4;		// move index to next
							// msg/color
				x=0;			// move msg L-to-R next
				y=120;			// time
				LtoR=1;
			}
		}
	System.exit(0);
	}
}



Thanks in advance for clues.

-- 
Mason Loring Bliss          awake ? sleep : random() & 2 ? dream : sleep;
mason at acheron.middleboro.ma.us      https://acheron.ne.client2.attbi.com/



More information about the kaffe mailing list