Posted March 19, 201312 yr i havnt even touched this class but when i opened eclipse today minecraft wont start saying theres an error with the start.java theres tonees or red error lines all over this package import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; import net.minecraft.client.Minecraft; public class Start { public static void main(String[] args) { try { Field f = Minecraft.class.getDeclaredField("minecraftDir"); Field.setAccessible(new Field[] { f }, true); f.set(null, new File(".")); } catch (Exception e) { e.printStackTrace(); return; } if (args.length != 2) { Minecraft.main(args); } else { try { String parameters = "http://login.minecraft.net/?user=" + URLEncoder.encode(args[0], "UTF-8") + "&password=" + URLEncoder.encode(args[1], "UTF-8") + "&version=" + 13; String result = openUrl(parameters); if (result == null) { System.out.println("Can't connect to minecraft.net"); return; } if (!result.contains(":")) { System.out.println("Login Failed: " + result); return; } String[] values = result.split(":"); Minecraft.main(new String[] {values[2].trim(), values[3].trim()}); } catch (Exception e) { e.printStackTrace(); } } } private static String openUrl(String addr) { try { URL url = new URL(addr); java.io.InputStream is; is = url.openConnection().getInputStream(); java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(is)); String buf = ""; String line = null; while ((line = reader.readLine()) != null) { buf += "\n" + line; } reader.close(); return buf; } catch (IOException e) { e.printStackTrace(); } return null; } } here is the error code Exception in thread "main" java.lang.Error: Unresolved compilation problems: String cannot be resolved to a type Field cannot be resolved to a type Class<Minecraft> cannot be resolved to a type Field cannot be resolved Field cannot be resolved to a type File cannot be resolved to a type Exception cannot be resolved to a type String cannot be resolved to a type URLEncoder cannot be resolved URLEncoder cannot be resolved String cannot be resolved to a type System cannot be resolved System cannot be resolved String cannot be resolved to a type String cannot be resolved to a type Exception cannot be resolved to a type at Start.main(Start.java:13) Use examples, i have aspergers. Examples make sense to me.
March 19, 201312 yr Author as in restart eclipse or reinstall all of it? Use examples, i have aspergers. Examples make sense to me.
March 19, 201312 yr Author can you tell me how i fudged up so i can avoid it next time? Use examples, i have aspergers. Examples make sense to me.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.