File associations in Java using jnlp.jar, without full JWS?

前端 未结 1 1510
天涯浪人
天涯浪人 2021-01-27 20:02

The Java Web Start technology has an IntegrationService API for creating file associations. My question is whether it is possible to somehow use this API (possibly by including

1条回答
  •  再見小時候
    2021-01-27 20:20

    No web site is required to use a jnlp file locally, just use a file URI scheme for the jnlp codebase and jar href.

    This will let you experiment with file associations, but you'll want to do a backup and clean the Java Preferences cache first.

    Addenda:

    • As a concrete example, this jnlp launches JFreeChart:

      
      
          
              JFreeChart 1.0.14 Demo
              Object Refinery Ltd
              
              A demo for the JFreeChart class library
              JFreeChart demo application.
              JFreeChart 1.0.14 Demo
              
          
          
              
              
              
              
          
          
      
      
    • The tag uses the attributes mime-type and extensions as "a hint to the JNLP client that it wishes to be registered with the operating system as the primary handler of certain extensions and a certain mime-type."

    0 讨论(0)
提交回复
热议问题