google-code-export / sqljet

Automatically exported from code.google.com/p/sqljet
0 stars 1 forks source link

Exception in thread "main" java.lang.NoClassDefFoundError: org/tmatesoft/sqljet/core/SqlJetException #161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
--- What steps will reproduce the problem?
javac Testing.java -classpath sqljet-1.0.7.jar
java Testing -jar sqljet-1.0.7.jar
What is the expected output? What do you see instead?

Testing.java
--
import java.io.File;

import org.tmatesoft.sqljet.core.table.SqlJetDb;
import org.tmatesoft.sqljet.core.SqlJetTransactionMode;
import org.tmatesoft.sqljet.core.SqlJetException;

public class Testing {

    private static final String DB_NAME = "db.sqlite";

    public static void main(String[] args) {

        File dbFile = new File(DB_NAME);
        dbFile.delete();
        SqlJetDb db;

        try {
            db = SqlJetDb.open(dbFile, true);
            db.getOptions().setAutovacuum(true);
            db.beginTransaction(SqlJetTransactionMode.WRITE);
            db.getOptions().setUserVersion(1);
            db.commit();

        } catch (SqlJetException e) {
            e.printStackTrace();
        } finally {
            System.out.println("Dude we are Done.");
        }
    } // end main.
} // end class.

--

--- What version of the product are you using? On what operating system?
sqljet-1.0.7
On OSX 1.06 and java version "1.6.0_26"
Ubuntu 10.04 and java version "1.6.0_20"

--- Please provide any additional information below.
What am I doing wrong?
What do I need to change in order to make this work?

Original issue reported on code.google.com by mobile.h...@gmail.com on 23 Sep 2011 at 7:02

GoogleCodeExporter commented 9 years ago
Use that:

java Testing -cp sqljet-1.0.7.jar

Original comment by sergey.s...@gmail.com on 23 Sep 2011 at 8:03

GoogleCodeExporter commented 9 years ago
Thanks.

This works:
java -classpath ".:sqljet-1.0.7.jar:antlr-runtime-3.1.3.jar" Testing

Original comment by hclavi...@gmail.com on 23 Sep 2011 at 9:19

GoogleCodeExporter commented 9 years ago

Original comment by sergey.s...@gmail.com on 23 Sep 2011 at 9:21