This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
java_introduction [2015/06/09 13:59] Joel Dare [SQLite Library] |
java_introduction [2015/06/09 14:02] Joel Dare [SQLite Library] |
||
---|---|---|---|
Line 19: | Line 19: | ||
</code> | </code> | ||
- | ==== Compiled ==== | + | ==== Compile to Bytecode ==== |
Java code starts as plain text files and then is compiled to bytecode. If the code above is in a file called Application.java then the following command compiles that. | Java code starts as plain text files and then is compiled to bytecode. If the code above is in a file called Application.java then the following command compiles that. | ||
Line 29: | Line 29: | ||
java Application | java Application | ||
- | ==== SQLite Library ==== | + | ==== Using Libraries ==== |
- | You can download and use libraries as .jar files. You'll find the SQLite library on Bitbucket at the URL below. | + | You can download and use libraries as .jar files. In this example I'll load the SQLite-jdbc library. You'll find it on Bitbucket at the URL below. |
https://bitbucket.org/xerial/sqlite-jdbc/downloads | https://bitbucket.org/xerial/sqlite-jdbc/downloads | ||
Line 37: | Line 37: | ||
Download the latest version and place it in the same directory as your application. | Download the latest version and place it in the same directory as your application. | ||
- | Import the file into your application with the following line. In the Hello World example above this will be the first line in the Application.java file. | + | Import the file into your application with the following line. This line will differ depending on the library you're loading. See the libraries documentation for the exact line to use. For the SQLite-jdbc library, in the Hello World example above, this will be the first line in the Application.java file. |
import java.sql.*; | import java.sql.*; |