I am making a game in libdgx and storing a high-score list online in a file. One of my computers is able to access the file online, while the other computer connected to the same router cannot. I tried turning off the firewall but it has not helped. What may be the cause of this problem?
try {
URL url = new URL("ftp://.............highscores.txt");
InputStream in = url.openStream();
java.util.Scanner s = new java.util.Scanner(in).useDelimiter(" ");
for(int i=0;i<5;i++)
{
scores[i] = s.nextInt();
}
for(int i=0;i<5;i++)
{
names[i] = s.next();
}
}
catch(java.io.IOException e){}
Here is the stack trace
java.net.SocketException: Permission denied: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at sun.net.ftp.impl.FtpClient.readServerResponse(FtpClient.java:421)
at sun.net.ftp.impl.FtpClient.readReply(FtpClient.java:498)
at sun.net.ftp.impl.FtpClient.issueCommand(FtpClient.java:533)
at sun.net.ftp.impl.FtpClient.issueCommandCheck(FtpClient.java:544)
at sun.net.ftp.impl.FtpClient.openPassiveDataConnection(FtpClient.java:607)
at sun.net.ftp.impl.FtpClient.openDataConnection(FtpClient.java:710)
at sun.net.ftp.impl.FtpClient.getFileStream(FtpClient.java:1284)
at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:428)
at java.net.URL.openStream(URL.java:1037)