when i try to use MinecraftServerPing in my code (in offline,simulating a server crash or not started), i get a NoRouteToHostException, and my game crash.
I tried to use a catch(IOException) and a catch(NoRouteToHostException),but it didn't worked... Same error...
I already searched,but i didn't find anything...So...Could you help me a little?
Here's the stacktrace :
java.net.NoRouteToHostException: No route to host: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at ch.jamiete.mcping.MinecraftPing.getPing(MinecraftPing.java:65)
at fr.worms.custommenu.GuiLibertyGlowMenu.initGui(GuiLibertyGlowMenu.java:231)
at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:296)
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:816)
at fr.worms.custommenu.ModLibertyMenu.onTickClient(ModLibertyMenu.java:96)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_4_ModLibertyMenu_onTickClient_ClientTickEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122)
at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:329)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2122)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:996)
at net.minecraft.client.Minecraft.run(Minecraft.java:912)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Hello,
when i try to use MinecraftServerPing in my code (in offline,simulating a server crash or not started), i get a NoRouteToHostException, and my game crash. I tried to use a catch(IOException) and a catch(NoRouteToHostException),but it didn't worked... Same error... I already searched,but i didn't find anything...So...Could you help me a little?
Here's the stacktrace :
java.net.NoRouteToHostException: No route to host: connect at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at ch.jamiete.mcping.MinecraftPing.getPing(MinecraftPing.java:65) at fr.worms.custommenu.GuiLibertyGlowMenu.initGui(GuiLibertyGlowMenu.java:231) at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:296) at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:816) at fr.worms.custommenu.ModLibertyMenu.onTickClient(ModLibertyMenu.java:96) at cpw.mods.fml.common.eventhandler.ASMEventHandler_4_ModLibertyMenu_onTickClient_ClientTickEvent.invoke(.dynamic) at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51) at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122) at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:329) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2122) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:996) at net.minecraft.client.Minecraft.run(Minecraft.java:912) at net.minecraft.client.main.Main.main(Main.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)