SHARE
TWEET

Run Minecraft Client in IDE

swimauger Mar 21st, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void main(String[] args) {
  2.   String line;
  3.   Process p;
  4.   String os = System.getProperty("os.name");
  5.   try {
  6.     if(os.equalsIgnoreCase("win")) {
  7.       p = Runtime.getRuntime().exec("gradlew runClient");
  8.     } else {
  9.       p = Runtime.getRuntime().exec("./gradlew runClient");
  10.     }
  11.     BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
  12.     while ((line = input.readLine()) != null) {
  13.       System.out.println(line);
  14.     }
  15.     input.close();
  16.   } catch (IOException e) {
  17.       e.printStackTrace();
  18.   }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top