Apr 22, 2010

JavaFX 1.3 Released

We're very excited to announce the immediate availability of the JavaFX 1.3 platform. This release represents an important upgrade to the product and delivers a range of performance and functional improvements, including: * New and enhanced support for UI controls, CSS skinning, and programmatic layout * Performance improvements in the JavaFX Runtime * New NetBeans IDE 6.9 Beta with improved editing and an updated JavaFX Composer plug-in * New features and enhanced performance in JavaFX Production Suite * A native JavaFX font family called Amble * Support for the development of TV applications, including a new TV emulator * Availability of the mobile emulator on the Mac platform
I'm going to give it a very last try. If this technology is still unusable for the real-life applications, then I will never look at it again! More details at the official site.

Apr 15, 2010

Substance 6.0 official release

It is a great pleasure to announce the availability of the final release or version 6.0 of Substance look-and-feel (code-named Sonoma). The release notes for version 6.0 contain the detailed information on the contents of this release which include the following: * Multi-state animated transitions * New look for text based components (text fields, combo boxes, spinners, date pickers) * Custom component states * Support for drop location
For more detail see official site... Animations in Substance 6.0 are powered by the Trident animation library. You will need to add the matching Trident jar to your classpath. Substance 6.0 is using version 1.2 of Trident which can be downloaded from the main Trident download area or from the Substance 6.0 download area.

Apr 11, 2010

HTTP basic authentication. Credential caching

By default, when using authentication for connections, each host/port (or proxy host/port) is associated with a single set of credentials. A key for the credentials is a string specified as follows: A:[B:]C:D:E[:F] Between 4 and 6 fields separated by ":" where the fields have the following meaning: A is "s" or "p" for server or proxy authentication respectively B is optional and is "D", "B", or "N" for digest, basic or ntlm auth. C is either "http" or "https" D is the hostname E is the port number F is optional and if present is the realm. After being initially requested (and assuming the credentials are valid), any subsequent HttpURLConnections on that host/port (or proxy host/port) will use the same credentials. There are some situations where you may wish to have different sets of authentication credentials for connections going to the same host/port. Unfortunately this caching behaviour is hardcoded in JDK and could not be changed via any configuration. The only solution I have found was using of custom implementation for this cache. This method implies dealing with Sun proprietary classes.
import sun.net.www.protocol.http.AuthCache;
import sun.net.www.protocol.http.AuthCacheValue;


AuthCacheValue.setAuthCache(new AuthCache() {
      public void remove(String arg0, AuthCacheValue arg1) {
      public void put(String arg0, AuthCacheValue arg1) {
      public AuthCacheValue get(String arg0, String arg1) {
        return null;
    Authenticator.setDefault(new Authenticator() {
      protected PasswordAuthentication getPasswordAuthentication() {
        return new MyPasswordAuthentication(...);
In this case no credential are cached at all. It works for me. If you know another way to disable caching of credentials, please share it with me.