java.io.FileNotFound Exception
843798Sep 15 2004 — edited Sep 16 2004I have a Java applet that will work for my users with a JRE prior to 1.4.2 When anyone runs the applet using JRE 1.4.2_03+ it no longer works and they get the following message:
** NEWS APPLET STARTED. **
host is :edge.c2d.fedex.com
here i am 1
/news/news.txt
Exception : java.io.FileNotFoundException: http://edge.c2d.fedex.com/news/news.txt#
here i am 2
here i am 4
Failed to open start date file on edge.c2d.fedex.com.
I have isolated the problem to when I am trying to open the URL. It doesn't seem to recognize it.
I am a fairly limited Java Programmer and would appreciate any help or guidance.
Thanks,
code:
else if (codeBaseHost.startsWith("edge.c2d")) {
System.out.println("here i am 1");
System.out.println(dev_server.getFile());
openConnection = dev_server.open();
System.out.println("here i am 2");
if (openConnection) {
System.out.println("here i am 3");
System.out.println("connection made to dev server");
int dataAvailable = dev_server.queryDataAvailable();
System.out.println("number of bytes available for reading: "+dataAvailable);
byteCount = dev_server.readFile( buffer );
newsString = new String(buffer);
System.out.println("contents of start date file: "+newsString);
dev_server.close();
return true;
}
System.out.println("here i am 4");
System.out.println("Failed to open start date file on edge.c2d.fedex.com.");
return true;
}