I solved this using a workaround by Base64 encoding the strings.
Basically when generating the jnlp file (PHP):
<property name="<?=$key?>" value="<?=base64_encode($value)?>" />
And then in the application:
import org.apache.commons.net.util.Base64;
...
jnlpURL = deBase64(System.getProperty("jnlp.url"));
...
private String deBase64(String str)
{
if (Base64.isArrayByteBase64(str.getBytes())) {
return new String(Base64.decodeBase64(str));
} else {
return str;
}
}
This does not solve the original issue why it returns null, but provides a way to circumvent that.