Wildcards in application path?

Is it possible to use wildcards in application path and/or names when writing firewall rules?

I.e., Java-runtime is installed in "C:\ProgramFiles\Java\jreA.B.C_D\bin" (where A, B, C and D are numbers). With every new version those numbers change, and I’m sick of re-writing application path whenever java is updated.

Next example, filename: I have separate rule for java.exe, javaw.exe and javaws.exe

Could I write one common application path “C:\ProgramFiles\Java\jre*\bin\java*.exe” ?

No but you can do so when creating a file group, then use that file group as the rule.