Navigation

RSS 2.0 New Entries Syndication Feed Atom 0.3 New Entries Syndication Feed

Show blog menu v

 

General

Use it

Documentation

Support

Sibling projects

RIFE powered

Valid XHTML 1.0 Transitional

Valid CSS!

Blogs : Latest entries

avatar
Flaky file URL objects with JDK 1.4 on windows

Beware when you're creating URL instances by providing the entire spec without separating it into protocol, host, and file.

If your URL spec happens to be in the following format:

file://C:/somepath/file

JDK 1.4 will try to lookup the C host name. This will of course fail, but by default it takes 5 minutes to do so on Windows. Imagine what happens when you have several of these URLs ...

To work around this issue, make sure to instantiate your file protocol URLs like this:

String filepath = "C:/somepath/file";
URL url = new URL("file", null, filepath);

This will prevent the JDK from getting confused.

You can find proof of this behavior in this screenshot of a debugging session that Stéphane Meslin-Weber performed to track down slow startup times in RIFE:

This issue seems to have been fixed in JDK 1.5.

Update:

It seems that I jumped to conclusions too quickly and that the correct URL format should have an additional slash:

file:///C:/somepath/file

The confusing part for us was that JDK 1.5 doesn't seem to try to lookup C as a hostname, which made the issue very hard to track down since none of the core RIFE devs use JDK 1.4. We use retroweaver to generate a compatible version.

posted by Geert Bevin in Java on Dec 22, 2005 5:42 PM : 5 comments [permalink]
 
RIFE 1.3.1 released

Below are the highlights:

  • Workaround for JDK 1.4 bug on Windows [ more ]
  • Bug-fixes to some new features that 1.3 offered [ more ]
  • Support for Derby network driver [ more ]

You can read the full changelog for more details.

If you are upgrading from a pre-1.3 release, it's a good idea to also read the 1.3 release announcement.

read more...

posted by Geert Bevin in RIFE on Dec 22, 2005 4:32 PM : 2 comments [permalink]
 

 
 
 
Google
rifers.org web