0

I was trying to compile some java codes using gcj. I am getting following error. Is it because something in that line is not supported by my gcj? Btw, I am using gcj to see if native codes are any better than bytecodes with latest hot-spot JVMs.

AbstractCursor.java:113: error: '{' expected. public abstract class AbstractCursor implements Cursor { ^ AbstractCursor.java:113: confused by earlier errors, bailing out

Thanks ~ Reaz

PermGenError
  • 45,977
  • 8
  • 87
  • 106
  • 2
    It would help if you posted the code you are trying to compile. If it is a big program, post a short sample program that reproduces the error. – Aaron Kurtzhals Dec 21 '12 at 19:27
  • Probably the next symbol _after_ that is erroneous like `(`. Note that an anonymous initializer starts with `{`. – Joop Eggen Dec 21 '12 at 19:36
  • Best way to figure out confusing compiler errors is by reducing the code to the smallest that gives the error. Usually the errors jumps at you somewhere along the trimming, if not post it on SO :) – Miserable Variable Dec 21 '12 at 19:42
  • If we could see the code it would be easier to help – MrKiane Dec 21 '12 at 19:47

1 Answers1

0

Ahh, my (wild) guess: the line number 113 seems to indicate, that this is maybe the second class definition in the source. There may be only one non-inner public class in a .java file.

Or this is an inner class but braces are nested wrong.

Joop Eggen
  • 107,315
  • 7
  • 83
  • 138