Has the user screwed up their hosts file? https://github.com/processing/processing/issues/4738
()
| 123 | * https://github.com/processing/processing/issues/4738 |
| 124 | */ |
| 125 | static private void checkLocalHost() throws SketchException { |
| 126 | try { |
| 127 | InetAddress address = InetAddress.getByName("localhost"); |
| 128 | if (!address.getHostAddress().equals("127.0.0.1")) { |
| 129 | System.err.println("Your computer is not properly mapping 'localhost' to '127.0.0.1',"); |
| 130 | System.err.println("which prevents sketches from working properly because 'localhost'"); |
| 131 | System.err.println("is needed to connect the PDE to your sketch while it's running."); |
| 132 | System.err.println("If you don't recall making this change, or know how to fix it:"); |
| 133 | System.err.println("https://www.google.com/search?q=add+localhost+to+hosts+file+" + Platform.getName()); |
| 134 | throw new SketchException("Cannot run due to changes in your 'hosts' file. " + |
| 135 | "See the console for details.", false); |
| 136 | } |
| 137 | |
| 138 | } catch (UnknownHostException e) { |
| 139 | e.printStackTrace(); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | |
| 144 | public VirtualMachine launch(String[] args) { |
no test coverage detected