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 4 of 4

Thread: Installing Java program with database on another computer.

  1. #1
    Member Faz's Avatar
    Join Date
    Mar 2010
    Posts
    97
    Thanks
    5
    Thanked 14 Times in 14 Posts

    Default Installing Java program with database on another computer.

    Hey guys

    I'm currently developing a gym membership system for my aunt. I'm using Java and mySQL as the database. I'm getting fairly close to finishing it all I need to do is add a few analytical abilities to it and get it to interact with a barcode scanner(that could be very tricky).

    But one thing I'm wondering now is how will I set up the database on their computer? Will I have to actually download mySQL and set up the tables etc? I've only done brief searches and what I've come across a few suggestions such as using IzPack or HSQLDB but I'm not really too sure about these (anyone used them?).

    I was hoping anyone who has had experience in doing something similar could point me in the right direction.

    Regards
    Faz


  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: Installing Java program with database on another computer.

    Hello Faz,

    Yes, either you'd have to download MySQL and install it on the machine you want to run it on or you could of course use a Java database like H2 Database which you can embed in your application but that will of course make it difficult later on if you want to have multiple applications talking to one database.

    Regarding setting up tables etc, this depends on what frameworks etc you might be using to talk to the database but in most cases I'd say yes, you need to somehow create a schema and its tables on the database your self.

    For more information on the H2 Database have a look at Tutorial

    // Json

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Installing Java program with database on another computer.

    Apache Derby is another alternative, and is supported by oracle (see Java DB). I've used it in distributed applications and it works great - just distribute a single jar with your app and you are good to go. MySQL has its own syntax for certain things (InnoDB, autoincrement, etc..) so there will be small porting needed, at least if you use Derby.

  4. #4
    Member Faz's Avatar
    Join Date
    Mar 2010
    Posts
    97
    Thanks
    5
    Thanked 14 Times in 14 Posts

    Default Re: Installing Java program with database on another computer.

    Hey Guys

    Cheers for the info I will check them out.

Similar Threads

  1. Java Barcode Program with Oracle database
    By techsing14 in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: December 6th, 2012, 05:19 AM
  2. connect java to a database
    By ridg18 in forum JDBC & Databases
    Replies: 1
    Last Post: December 25th, 2010, 11:28 AM
  3. computer science help
    By hairyjewbear in forum Algorithms & Recursion
    Replies: 6
    Last Post: November 4th, 2010, 04:05 PM
  4. how to import excel file to database table using java
    By palani in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: September 3rd, 2010, 12:17 AM
  5. Database in a standalone computer
    By Abednego Setyawan in forum JDBC & Databases
    Replies: 1
    Last Post: April 7th, 2010, 09:24 PM