How to get the JRE to bundle with launch4j?

前端 未结 2 951
死守一世寂寞
死守一世寂寞 2021-01-02 19:39

I understand that launch4j doesn\'t bundle the JRE in the .exe but that you have to place it next to it. My question is, how am I supposed to do that? Is there

2条回答
  •  独厮守ぢ
    2021-01-02 20:11

    I believe this is what you are looking for:

    
      com.akathist.maven.plugins.launch4j
      launch4j-maven-plugin
      
        
          ...
          
            ...
            
              ${java.home} 
            
            ...
          
        
      
    
    

    Java lets you access JRE path using java.home system property. And you can access java system properties within pom. And you have a plugin that wraps launch4j. Put all of these together and you have the solution.

提交回复
热议问题