GeeCON Prague 2014*
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


JavaRanch » Java Forums » Java » Java in General
Bookmark "Not a statement error" Watch "Not a statement error" New topic
Author

Not a statement error

Charisse Lane
Greenhorn

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.

x1;
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;
x1;

throw new NoClassDefFoundError(x1.getMessage());
}

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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
Greenhorn

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,

Charisse
 
GeeCON Prague 2014
 
subject: Not a statement error