0

Possible Duplicate:
Recompile decompiled Java (JD / JAD) source that contains goto instructions

what's the meaning of goto _L1 when i decompile class java

Community
  • 1
  • 1
mobileDeveloper
  • 894
  • 2
  • 14
  • 35
  • 1
    http://stackoverflow.com/questions/2036984/recompile-decompiled-java-jd-jad-source-that-contains-goto-instructions – adarshr Mar 14 '11 at 14:35
  • i guess it transfers the control to the mentioned label, but why do you care? – asgs Mar 14 '11 at 14:36

2 Answers2

1

The decompiler was not wise enough to handle some statements, most likely compiled try-catch-statements. So he resigns, and does something syntactically correct, but unlikely to be like this is the original source.

goto _L1

is just a Java statement meaning go to the instruction AFTER the block of code following the goto statement (This is mad, I know, but that is how Java implemented it).

Daniel
  • 27,718
  • 20
  • 89
  • 133
0

goto isn't a Java keyword. What you're seeing is a remnant of improper decompilation.

http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html

adarshr
  • 61,315
  • 23
  • 138
  • 167
  • 1
    Strictly speaking `goto` **is** a keyword in Java. It just has no meaning. – Joachim Sauer Mar 14 '11 at 14:40
  • Well, the code never compiles if there's a `goto`. Quoting Sun, "The keywords const and goto are reserved, even though they are not currently used." it is a reserved keyword. – adarshr Mar 14 '11 at 14:44