Jumping out of Java finally

The definition of the return statement in the current Java Language Specification (§14.17) features an innocuous-looking sentence: It can be seen, then, that a return statement always completes abruptly. Other statements that “always complete abruptly” include break (§14.15), continue (§14.16), and of course throw (§14.18). So what? Well, Java also has try-finally blocks (§14.20). As … Continue reading “Jumping out of Java finally”

Amazing NetBeans JAR Vanishing Act

Today I encountered a bizarre and obscure misbehavior of NetBeans 7.3.1 that you should be aware of when writing JavaFX applications. The situation: I wanted to add some text files to a JavaFX project that should be copied to the output folder at every build. The NetBeans way to do this is to add a … Continue reading “Amazing NetBeans JAR Vanishing Act”

Programming .NET 4.5 without VS2012

Back in the good old days, when the Windows start menu wasn’t designed for smartphones, the free Windows SDK 7.1 shipped with all .NET 4.0 compilers and even Visual C++. As noted previously, Microsoft decided to stop this generosity and removed all compilers from the new Windows SDK 8.0 for .NET 4.5. In the case … Continue reading “Programming .NET 4.5 without VS2012”

WinRT vs C# Overload Resolution

Browsing the Application Compatibility notes for the new .NET Framework 4.5, I noticed a very odd entry concerning Math.Ceiling and Math.Floor: Change: When you use .NET for Windows Store apps, C# may have difficulty with overload resolution when the Math.Ceiling or Math.Floor method is passed an integer. Impact: Source code may not compile successfully, or … Continue reading “WinRT vs C# Overload Resolution”