This is my first time editing a program made in java, i just know how to program in PHP, the problem is that I'm editing a program previously done in Java, as was done just dedicated myself to add a few lines of code to extend its capabilities (copy and paste only ) Well is that I have this WebScraper.class file and I could decompile and convert java to edit ,when compile I get the following error:
I tested with Eclipse and when I give Run does nothing , I tried changing the version of JDK and nothing I tried on another computer and still nothing , I've been reading on previous responses is due to the "goto " but I have not managed to fix it , since I do not know how this part must be programmed to be successfully compiled. Greatly appreciate your help, or tell me how to use the Eclipse or exactly what to put to fix the mistakes I have.
C:\Users\Tecnicom\Downloads\Prog>javac WebScraper.java
WebScraper.java:99: error: illegal start of expression
if (i >= 3) goto _L2; else goto _L1
^
WebScraper.java:99: error: not a statement
if (i >= 3) goto _L2; else goto _L1
^
WebScraper.java:99: error: 'else' without 'if'
if (i >= 3) goto _L2; else goto _L1
^
WebScraper.java:99: error: illegal start of expression
if (i >= 3) goto _L2; else goto _L1
^
WebScraper.java:99: error: ';' expected
if (i >= 3) goto _L2; else goto _L1
^
WebScraper.java:143: error: illegal start of expression
goto _L3
^
WebScraper.java:144: error: ';' expected
_L2:
^
7 errors
I'll show a part of the code where it show the error:
static Hashtable parseFirmwarePage(String s)
{
Matcher matcher = pattern.matcher(s);
Hashtable hashtable = new Hashtable();
do
{
if(!matcher.find())
break;
String s1 = matcher.group(1);
if(s1 != null && s1.trim().length() != 0 && displayFields.contains(s1))
{
String s3 = matcher.group(2);
if(s3 != null && s3.trim().length() != 0 && !s3.toLowerCase().contains("todo"))
hashtable.put(matcher.group(1), s3);
}
} while(true);
String s2 = String.format("%s_%s", new Object[] {
hashtable.get("device"), hashtable.get("build")
});
if(s2.equalsIgnoreCase("ipod11_7E18"))
hashtable.put("downloadurl", "iPod1,1_3.1.3_7E18_Restore.ipsw");
return hashtable;
}
static String wikiMarkupForPage(String s)
{
int i = 0;
_L3:
if(i >= 3) goto _L2; else goto _L1
_L1:
if(i != 0)
{
gui.error("The iPhone Wiki seems a bit down; retrying in %d sec..", new Object[] {
Integer.valueOf(30)
});
try
{
Thread.sleep(30000L);
}
catch(InterruptedException interruptedexception)
{
gui.exc(interruptedexception);
}
}