0

i am working a java app using an sqlite db, with eclipse.

i produce an executable jar with library handling: copy required libraries into a sub-folder next to generated JAR

the problem is that the app runs ok in my computer, but when i try to run it in another computer doesnt connect with the db.

(in code i put url for db E:\\ and i put also the .sqlite file in that location in my and the other computer)

String url = "E:\\"; this.dburl = "jdbc:sqlite:"+url+"\\converted.sqlite";

i want the .sqlite file to be out or jar file, so i can back it up. Any ideas?

1 Answer 1

1

I always like to use unix style forward slashes in path and it also work in windows. you are putting an extra slash in your db url. Try to put these file into C drive because other PC might not have an E drive. Try this:

String url = "E:/";
this.dburl = "jdbc:sqlite:"+url+"converted.sqlite";
Sign up to request clarification or add additional context in comments.

1 Comment

I agree. Always use forward slashes even on Windows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.