(17-02-2017 19:02)simoncn Wrote: [ -> ]You could copy the real javaw.exe into C:\ProgramData\Oracle\Java\javapath, overwriting the symbolic link. You would need to do this every time you install a Java update but this might perhaps be easier than updating firewall rules.
My apologies to Simon and MarmiteSandwich for giving duff information here. I thought I'd correctly checked that the image name for Javaw depended on which you way launch it. Although update 101 uses symlinks in C:\ProgramData\Oracle\Java\javapath, update 121 doesn't, and I assume (but haven't tested this) uses hard links. So, I'm puzzled. If that's the case, I can't see how overwriting javaw.exe would help. In any case, that's the kind of action that really is best avoided because it's too hard to understand what's going on.
As to MarmiteSandwich's issue, the most obvious option, if you don't mind an extra step is to script the firewall change. I think that this can be done with netsh advfirewall commands, but I haven't checked.
Alternatively, I think you could use an executable launcher for Java programs, provided that it runs the java DLLs directly, rather than via javaw.exe. This is what winrun4j does. winrun4j is used by BubbleUPNPServer (in service configuration) If you use Bubble UPNPServer, you may know whether it needs firewall rules of its own - which would show that it does what you need.
You'd need to copy the appropriate version (32 or 64 bit, console or GUI) to your MinimServer directory, rename it, and put the required ini file in place. The ini file needs to know the class path to execute. There's a correct way of finding this out (with an appropriate java program), but it's probably what it says in the manifest file in mserver.jar:
Main-Class: com.minimserver.launch.LaunchServer
I don't think you'd need to know anything else, but I haven't tested this. (The option to run as a service wouldn't be appropriate here, because that assumes that the application is designed to do this.)
This also depends on Simon not changing the main class path; he has no reason to do this that I can think of, but nothing else would break if he did.
The one (tiny) advantage of using a private launcher, is that you wouldn't be giving permission for any Java program to work through the firewall, which is what we're doing at the moment.