File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Not a statement error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Not a statement error" Watch "Not a statement error" New topic

Not a statement error

Charisse Lane

Joined: Apr 07, 2009
Posts: 14
I am trying to compile code that was previously compiled but isn't working for me for some reason.

Can anyone tell me if there's another way to do the following? I don't understand because this was previouly compiled - all I did was decompile and try to recompile after changing a completely separate method. I haven't touched this code.

is not a valid statement and I don't know why it's being declared here but when I remove it, I get an error that it hasn't been initialized and is then the other statement is unreachable.

static Class _mthclass$(String x0)
return Class.forName(x0);

ClassNotFoundException x1;

throw new NoClassDefFoundError(x1.getMessage());

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

The decompiler has produced completely invalid code; they do that sometimes if they can't quite figure out what the code is supposed to do -- or if they're decompiling bytecodes that weren't compiled from Java source in the first place, which may be the case here. Maybe it's just supposed to be something like

[Jess in Action][AskingGoodQuestions]
Charisse Lane

Joined: Apr 07, 2009
Posts: 14
Thank you so VERY much!!! That worked. I would have literally been here all day trying to figure this out.

Take care,

I agree. Here's the link:
subject: Not a statement error
It's not a secret anymore!