I may be using my Java program (which is initialized by the simple Batch code at the bottom, which may or may not help anything). From my main computer which will connect to localhost to get to my MySql server.
I otherwise could be connecting via a laptop, which is on the same Wi-Fi network. Therefore, I believe it would use the IPv4 address. Lastly, I could connect via a completely different network and would use my IP.
How could I use Java to detect where exactly it is and change which host it will connect to while pinging the server?
java -jar thb.jar
pause