netnix.org
Networking and Unix


Creating a Windows Executable Bundled with Java OpenJDK

 July 19th, 2018Jul 19th, 2018        1

In the past I have been a great fan of Launch4j which I have used on projects like TemplateFx to create a single Windows executable for my Java application. This has always relied on the end user having a version of Java installed as it wasn’t able to support bundling a JRE into the actual EXE file.

Over the last 12 months or so the development model of Java has changed – instead of having a new release every 3 years, we are now seeing a new release every 6 months. Java 11 will also be the first release where we don’t have a public Oracle JRE available for non-commercial use. Oracle will continue to provide support for Java 8 up until 2019/2020, but beyond Java 8 they expect you to start using OpenJDK for non-commercial use (64-bit only as they dropped support for 32-bit with Java 9) and recommend you bundle OpenJDK with your applications – see http://www.oracle.com/technetwork/java/eol-135779.html.

With this in mind, I am looking at ways that I can continue to advance the code beyond Java 8, but still provide a solution that works for people – it is unlikely that people will upgrade beyond Java 8 as Oracle isn’t automatically updating people beyond it. It is also unlikely that people will go out of their way to download OpenJDK, hence the reason for this post.

Under Project Jigsaw introduced in Java 9, where the JRE is now split out into smaller run-time modules, it has now become feasible to start bundling a version of the JRE with your application (this does have some disadvantages unless you update your application when the JRE is updated). Historically if you tried to bundle a JRE with your application then you would end up with a 200MB executable, but this post will show you how I was able to bundle OpenJDK 10 with my TemplateFx distribution, taking up a total of around 25MB.

[…]

General Java


Updated Encryption Routines in TemplateFx v2.54

 August 12th, 2016Aug 12th, 2016        0

In the spirit of public disclosure as all encryption/decryption routines should be publicly available for scrutiny, the following article includes the updated routines which are within TemplateFx v2.54. Previously TemplateFx was using AES-128 for encryption and HMAC-SHA256 for authentication. The keys were being derived using PBKDF2 with HMAC-SHA1 using 100,000 iterations. However, I wasn’t completely happy with the following bits:

  1. I was using PBKDF2 with HMAC-SHA1 as the PRF (pseudo-random function) which didn’t provide enough output for my HMAC-SHA256 key (160 bit output instead of 256 bit). This also meant I had to run PBKDF2 twice, which was a bit messy – once for my AES-128 key and once (with a different salt) for my HMAC-SHA256 key.
  2. My HMAC wasn’t across all the data – I was just including the ciphertext, which means someone could have changed my encryption salt to manipulate my decrypted ciphertext while still passing the HMAC authentication check.
  3. There was no support for AES-256 if the user had decided to install the “Java Cryptography Extension Unlimited Strength Jurisdiction Policy Files”.

[…]

General


TemplateFx v2.50

 March 29th, 2016Mar 29th, 2016        0

I am pleased to announce the release of Template v2.50 – a scriptable dynamic templating tool that enables you to write configuration templates once and deploy multiple times – never do the same thing twice. In addition, it now comes with a feature packed IPv4/IPv6 Subnet Calculator and DNS lookup tool built in!

PLEASE UPGRADE: There is a major data corruption bug found in TemplateFx v2.47 to v2.49 that will corrupt the output – it is highly recommended that you upgrade to fix this issue.

Download links and instructions can be found on the TemplateFx page.

[…]

General TemplateFx


TemplateFx v2.49

 March 13th, 2016Mar 13th, 2016        0

I am pleased to announce the release of Template v2.49 – a scriptable dynamic templating tool that enables you to write configuration templates once and deploy multiple times – never do the same thing twice. In addition, it now comes with a feature packed IPv4/IPv6 Subnet Calculator and DNS lookup tool built in!

Download links and instructions can be found on the TemplateFx page.

[…]

General TemplateFx


TemplateFx v2.48

 February 7th, 2016Feb 7th, 2016        0

I am pleased to announce the release of Template v2.48 – a scriptable dynamic templating tool that enables you to write configuration templates once and deploy multiple times – never do the same thing twice. In addition, it now comes with a feature packed IPv4/IPv6 Subnet Calculator and DNS lookup tool built in!

Download links and instructions can be found on the TemplateFx page.

[…]

General TemplateFx


1 2 3 - 7