Results 1 to 10 of 10
  1. #1
    IndioDoido is offline Member
    Join Date
    Apr 2009
    Posts
    4
    Rep Power
    0

    Default Deploying Java Desktop application with database (MySQL, ORACLE, other...)

    I'm going to developed a java application that will use a database which will be running in a local windows computer.
    I want to make this installation program distributable so that any user who does not know anything about java or data bases should be able to run it in his system with just a click. The user should not be forced to install a database or configure it. The only thing the user has to have is the java environment.

    Is there a way to do it?

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    First of all, please don't post the same question multiple times on the forum. Choose the best sub-forum and post your question more clearly.

    Regarding your question, all what you need to do is packaging your application. JAR is the standard packaging in Java application. Read the following tutorial on Suns' official web site.

    Lesson: Packaging Programs in JAR Files (The Java™ Tutorials > Deployment)

  3. #3
    IndioDoido is offline Member
    Join Date
    Apr 2009
    Posts
    4
    Rep Power
    0

    Default

    sorry about that...i really didn't know where to post my question :(

    about your reply, i didn't find anything related with databases :confused:

    i use netBeans to develop my applications, and my issue is how to distribute my application in a way that the user doesn't need to install and setup, for example, a mysql server to use my app.

  4. #4
    logicbug's Avatar
    logicbug is offline Member
    Join Date
    Jan 2009
    Location
    The Great White North, eh?
    Posts
    76
    Rep Power
    0

    Default

    You will have to do this with a "flat file database" like Microsoft Access, etc... If you only need to read from it you can put it in your jar file, if not it will have to be a seperate file.

  5. #5
    IndioDoido is offline Member
    Join Date
    Apr 2009
    Posts
    4
    Rep Power
    0

    Default

    i need to read/insert/delete data.
    i just don't want my client to install 3rd party software to use my app, like for example mysql server.

    is this possible?

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Quote Originally Posted by IndioDoido View Post
    i need to read/insert/delete data.
    i just don't want my client to install 3rd party software to use my app, like for example mysql server.

    is this possible?
    Think that if you are using MS Access as the DB, you need to install the office package in the system. If you are using the SQL, need to SQL database in your system.

    In general almost all PCs installed with MS Office package. If you are using MS Access as the DB, much easier.

  7. #7
    einarb is offline Member
    Join Date
    Mar 2009
    Posts
    22
    Rep Power
    0

    Default

    Quote Originally Posted by IndioDoido View Post
    i need to read/insert/delete data.
    i just don't want my client to install 3rd party software to use my app, like for example mysql server.

    is this possible?


    Take a look at hsqldb, i belive it should cover your needs. Just embedd it in your jar.

  8. #8
    Talljeezzy's Avatar
    Talljeezzy is offline Member
    Join Date
    Dec 2011
    Posts
    1
    Rep Power
    0

    Unhappy Re: Deploying Java Desktop application with database (MySQL, ORACLE, other...)

    Hello, its nice to see that this place could be quite helpful. I'm new to java and i have a similar problem. My app was designed with netbeans & using "apache derby" database. When i ran the app with Netbeans, INSERT, RETRIEVE & UPDATE worked fine on the DB from within the IDE, but when i built the ".jar" file (still with netbeans), and ran it using ... java -j myAppName.jar... at my windows command interface, everything including my GUI still worked fine except that INSERT, RETRIEVE & UPDATE where not working outside the IDE. Please who knows what might be causing it, does it have anything to do with the database connection? (am confused, cos it works from within the IDE).........What do i need to do for it to work in desktop environment outside the Netbeans IDE???????

  9. #9
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: Deploying Java Desktop application with database (MySQL, ORACLE, other...)

    Quote Originally Posted by Talljeezzy View Post
    Hello, its nice to see that this place could be quite helpful. I'm new to java and i have a similar problem. My app was designed with netbeans & using "apache derby" database. When i ran the app with Netbeans, INSERT, RETRIEVE & UPDATE worked fine on the DB from within the IDE, but when i built the ".jar" file (still with netbeans), and ran it using ... java -j myAppName.jar... at my windows command interface, everything including my GUI still worked fine except that INSERT, RETRIEVE & UPDATE where not working outside the IDE. Please who knows what might be causing it, does it have anything to do with the database connection? (am confused, cos it works from within the IDE).........What do i need to do for it to work in desktop environment outside the Netbeans IDE???????
    First, don't resurrect threads that are over 2 years old. Second, I recommend you read How to ask questions. Lastly, add the driver to your classpath

  10. #10
    Join Date
    Jan 2012
    Posts
    8
    Rep Power
    0

    Default Re: Deploying Java Desktop application with database (MySQL, ORACLE, other...)

    hi,
    i have same problem , can u tell me how can i do this task.

    Thanks & Regards,
    Navanath.

Similar Threads

  1. Replies: 3
    Last Post: 10-28-2010, 02:42 PM
  2. Deploying a java application on an web or appp server.
    By CharanZ in forum Advanced Java
    Replies: 1
    Last Post: 10-29-2008, 10:45 PM
  3. learn java desktop database programming
    By scchia in forum JDBC
    Replies: 0
    Last Post: 07-21-2008, 05:12 PM
  4. Installer for Java desktop application
    By nitingupta183 in forum SWT / JFace
    Replies: 0
    Last Post: 03-18-2008, 07:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •