Classpath including JAR within a JAR

前端 未结 13 1577
自闭症患者
自闭症患者 2020-11-22 02:21

Is it possible to specify a Java classpath that includes a JAR file contained within another JAR file?

13条回答
  •  萌比男神i
    2020-11-22 03:04

    If you are building with ant (I am using ant from eclipse), you can just add the extra jar files by saying to ant to add them... Not necessarily the best method if you have a project maintained by multiple people but it works for one person project and is easy.

    for example my target that was building the .jar file was:

    
        
            
            ................................
            
        
    
    

    I just added one line to make it:

    
        
        
            ................................
        
    
    

    where

    
    

    was the dir with the external jars. And that's it...

提交回复
热议问题