How do I find out which JAXP implementation is in use and where it was loaded from?

It is quite difficult to predict what concrete JAXP factory implementation will be loaded without actually creating an instance because the process for selecting an implementation. From the Official JAXP FAQ (Question 14): When an application wants to create a new JAXP DocumentBuilderFactory instance, it calls the staic method DocumentBuilderFactory.newInstance(). This causes a search for … Read more

Spring 3.2.x with Java 8

There is a best effort support of JDK8 in the 3.2.x line, as of 3.2.9+. See SPR-11656 for initial support in 3.2.9 and SPR-11979 for bytecode support improvements in 3.2.10. Please note the support limitations explained in the comments. For comprehensive support of JDK8, please upgrade to Spring 4.x – there’s a dedicated wiki page … Read more

Get Version Info for .exe

After spending hours online and coding I found a solution using JNA to get the Version Information for a file. import com.sun.jna.Library; import com.sun.jna.Memory; import com.sun.jna.Native; import com.sun.jna.Pointer; import com.sun.jna.ptr.IntByReference; import com.sun.jna.ptr.PointerByReference; import com.sun.jna.win32.W32APIOptions; import java.io.IOException; public class FileVersionInfo { interface Version extends Library { Version INSTANCE = (Version) Native.loadLibrary(“Version”, Version.class, W32APIOptions.UNICODE_OPTIONS); public int GetFileVersionInfoSizeW(String … Read more

Play Framework 2: Read the application version defined in Build.scala

You can define the version in application.conf and let Build.scala read the value. I did this with the version number and application name. The following works in Play 2.0, there is an updated solution for Play 2.1. In project/Build.scala, load the configuration and get the properties: val conf = play.api.Configuration.load(new File(“.”)) val appName = conf.getString(“app.name”).getOrElse(“unnamed … Read more