How to include an external jar lib in my Ant build

后端 未结 3 1701
时光取名叫无心
时光取名叫无心 2021-01-02 02:56

I have the following build.xml:




    




        
3条回答
  •  执念已碎
    2021-01-02 03:05

    There are two ways to run a java program. Using the "jar" option is the most convenient and is called an executable jar, however in order to make it work you need to specify both the Main class and classpath in the manifest file as follows:

    
        
            
            
        
    
    

    For a more detailed answer on how to do this see:

    Execute Java programs in a consistent environment

提交回复
热议问题