Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 13 of 13

Thread: SQLite and Desktop Application

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default SQLite and Desktop Application

    I have to make a Desktop Application with database ( SQLite )..

    How do i setup sqlite?

    + I would like to make a *.db data which contains tables and then in java application i want to operate with this *.db file as a database. Is that ok and possible?


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: SQLite and Desktop Application

    I'm not entirely sure how to set up SQLite but it cant be much different from the other database types out there, just make sure you have a connector for it.

    You might also want to look into Apache Derby or db4o :: Java & .NET Object Database ? Open Source Object Database, Open Source Persistence, Oodb

    // Json

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SQLite and Desktop Application

    for sqlite you don't need apache or something

    just create a database file and install sqlite driver for java

    it's a "db in a file"

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: SQLite and Desktop Application

    Yeah, same goes for Apache Derby or DB4O as well. I was just recommending other ones you could use.

    // Json

  5. #5
    Junior Member
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SQLite and Desktop Application

    i have a question.. how to install driver for sqlite?

    into which maps i have to put sqlitejdbc-v056.jar?

    and what classpaths to i have to setup?

  6. #6
    Junior Member
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SQLite and Desktop Application

    pleease help me:S

  7. #7
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: SQLite and Desktop Application

    You can either put the jar in your webapp/WEB-INF/lib folder or in your application server/lib folder.

    // Json

  8. #8
    Junior Member
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SQLite and Desktop Application

    but if i take the application to another computer, it won't work

  9. #9
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: SQLite and Desktop Application

    Ship the jar with your app in the lib folder.

    // Json

  10. #10
    Junior Member
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SQLite and Desktop Application

    what exactly do i have to do? i don't understand you (i'm a little bad at english)

    damn i'm noob

  11. #11
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: SQLite and Desktop Application

    Well I guess you might have other jar files that you pack into your application as well, so you must have a lib folder somewhere, or am I wrong?

    // Json

  12. #12
    Junior Member
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SQLite and Desktop Application

    i have
    C:\Program Files\Java\jdk1.6.0_16\jre\lib
    C:\Program Files\Java\jre6\lib

    and Application.java and Application.class on some another place

  13. #13
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: SQLite and Desktop Application

    When you develop your programs I take it you have some sort of source folder and some sort of lib folder to store code and libraries used.

    You can just put the jar file of the sqlite connector in the lib folder.

    Try googling for some information on how to ship third party jars with your application.

    // Json

Similar Threads

  1. application id not found
    By pradeepsetty in forum Java IDEs
    Replies: 3
    Last Post: June 2nd, 2010, 03:37 AM
  2. Desktop Database Application
    By TCoomer in forum JDBC & Databases
    Replies: 2
    Last Post: June 4th, 2009, 04:51 PM
  3. Replies: 0
    Last Post: May 21st, 2009, 12:17 PM
  4. Replies: 1
    Last Post: April 29th, 2009, 07:26 AM
  5. How to know number of user downloading an application?
    By jazz2k8 in forum Java Theory & Questions
    Replies: 2
    Last Post: July 3rd, 2008, 05:34 AM