问题
is there a way to associate a custom file extension with my java program on windows? I have installAnywhere to create an installer. But I'm not sure how this can be done if it's possible. Every installer on window does this, but what if it's in Java. I imagine it would require registry modification by the installer...
回答1:
Take a look at Launch4j. It allows you to wrap your java application into a native Windows .exe file, with which it should be trivial to associate a custom file extension.
Last time I dealt with InstallAnywhere was back when it was made by ZeroG, so I don't quite remember how it's done there. I'm using Nullsoft Install System now which has a convenient macro to register file extensions, I'm sure InstallAnywhere has a similar facility.
来源:https://stackoverflow.com/questions/1141095/associate-a-custom-file-extension-with-my-java-program-on-windows