我是否需要安装SQLite以便SQLiteJDBC工作? [英] Do I need to install SQLite so that SQLiteJDBC works?

查看:193
本文介绍了我是否需要安装SQLite以便SQLiteJDBC工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我不是得到它。如果我的计算机上没有安装SQLite,并且我想编写一个使用嵌入式数据库的Java应用程序,并且我将SQLiteJDBC JAR下载/导入到我的项目中,那么我需要的是什么?或者,我是否需要先安装SQLite并为我的SQLiteJDBC代码创建一个数据库文件以连接并运行查询?

I guess I'm just not "getting it". If I don't have SQLite already installed on my computer, and I want to write a Java app that uses an embedded database, and I download/import the SQLiteJDBC JAR into my project, is that all I need? Or, do I need to first install SQLite before and create a database file for my SQLiteJDBC code to connect to and run queries from?

如果是这样的话,那就不是了足以下载/导入SQLiteJDBC,那么这是不是意味着我必须确保在我想运行我的Java应用程序的每个系统上安装SQLite? 是否会破坏便携式/嵌入式数据库的目的?

If that's the case, and its not sufficient to just download/import SQLiteJDBC, then doesn't that mean that I'll have to make sure SQLite is installed on every system that I want to run my Java app on? And doesn't that defeat the purpose of a portable/embedded database?

基本上,我已经厌倦了SQLiteJDBC教程,因为:

Basically, I'm getting hung up on the SQLiteJDBC tutorials because:


  1. 他们没有告诉你如何创建HelloWorld.sqlite(SQLiteJDBC是否为你创建它,你是否必须在SQLite首先从命令提示符等);和

  2. 他们从不澄清SQLiteJDBC是否依赖于SQLite来使API调用起作用

非常感谢任何帮助!

推荐答案

您必须将SQLLite JAR放在应用程序的CLASSPATH中。除此之外没有安装。

You have to put the SQLLite JAR in the CLASSPATH of your app. There's no "install" beyond that.

也许本教程可以帮助您。

这是另一个,显示如何创建数据库和表。

Here's another that shows how to create a database and tables.

这篇关于我是否需要安装SQLite以便SQLiteJDBC工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆