How can I include external jar on my Netbeans project

后端 未结 12 2786
挽巷
挽巷 2020-11-27 06:25

When I run \"clean and build\" the .jar file that is being created only runs if the lib folder is at the same folder of the .jar file.

12条回答
  •  伪装坚强ぢ
    2020-11-27 07:24

    You could use Apache Ant since version 1.7 for build the JAR with the required libraries in only one file. You could have a configuration file as follows:

    
    
        
            
            
                
                    
                    
                    
                    
                
                
                
                
                
                
            
        
    
    

    In Netbeans, place the XML file in your project and run it with the context menu.

    See more in Apache Ant User Manual.

提交回复
热议问题