No suitable driver found (SQLite)

前端 未结 5 2033
夕颜
夕颜 2020-12-05 23:44

I hope someone can help me. I\'m working on a simple application which connects with an SQLite database. Following is my connection code:

try {           
           


        
5条回答
  •  一整个雨季
    2020-12-06 00:16

    If you use Maven and want to build an executable jar, you could decide to import the content of the sqlite jar into your own produced jar:

    
      
      
        maven-assembly-plugin
        
          
            package
            
              single
            
          
        
        
          
            
              true
              true
              true
              MyPackage.Main
            
          
          
            jar-with-dependencies
          
        
      
    
    

    You will not have to add specific classpath or implicit usage as proposed in the others answers.

提交回复
热议问题