aspose file tools*
The moose likes JDBC and the fly likes some queries about standalone application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "some queries about standalone application" Watch "some queries about standalone application" New topic
Author

some queries about standalone application

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
i m creating a standalone application with mysql...
how do i give that to the client??
what is required to be installed on the client machine??
also while development of application which driver i should use??(type1 or type4)??
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

you wil need to make or buy an installer to give it to the client.
I have only ever used a type 4 driver, especially for MYSQL see no reason to use any other.
You will need to ensure mysql is installed, and your database tables are setup/created/installed, and any data that is needed initially is also there.
You will need to ensure a java jre is installed (of the correct version).
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2

You will need to ensure mysql is installed, and your database tables are setup/created/installed, and any data that is needed initially is also there.


okay.. so mysql must be installed on client machine??
in case of embedded databases, i only need to attach jar file of db, can't do like this with mysql???
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18643
    
    8

I was going to answer that question and then I noticed that Wendy had already said everything I was going to say. Not only that, you copied her answer into your post. Please take time to read and understand the answers which are given to you.
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
i read the answer, and as such wendy said, mysql should installed there..??
so i m just confirming that on the client machine i have to install mysql first to use that application, isn't it??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

If that's where the database is to be running. Is it? The database server can be anywhere on the net.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
so you mean mysql be installed there..
and it's a standalone application..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Asking again from a different viewpoint: where does the client intend to run the database?
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
on his system, in which he is using that application...
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18643
    
    8

To put the answer in the simplest possible terms: MySQL must be installed and configured on the machine where the client intends it to run.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Does he already have a database? Most of my clients already run a database that I simply add my tables to.

If not, is mysql the best choice? If the DB is specific to the app and the client isn't going to be dealing with it, would not a DB such as HSQLDB or H2 be more appropriate and easier to manage?
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
yes earlier he was using microsoft access db..
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18643
    
    8

Then using a different database was definitely a good choice. But it's still possible, as Bear suggests, to ask whether an embedded database would be more practical than a database which has to be installed and managed.
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Punit Jain wrote:

You will need to ensure mysql is installed, and your database tables are setup/created/installed, and any data that is needed initially is also there.


okay.. so mysql must be installed on client machine??
in case of embedded databases, i only need to attach jar file of db, can't do like this with mysql???


MySQL isn't an embedded database, so you can't just ship a jar.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

I'll refrain from commenting on real versus toy databases.
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Bear Bibeault wrote:I'll refrain from commenting on real versus toy databases.


oh please please don't, i love a good rant, also would be interested to see, which side you put each db on
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
okay..so embedded db(java db) will be good choice??
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18643
    
    8

There are different databases. The reason for that isn't just that various ego-driven people wanted to create them (although that is part of the truth). The reason is that different databases are suitable for different purposes.

And therefore asking whether Database X would be a good choice, without saying anything about the system it would be running in or anything else, is a useless question.
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
well my application is not more complex, it just login and store some information of student and then fetches some data from database also and print the report...
that's it....
i m creating this application in java..
any embedded db, which is easier to use(as such i have never used any embedded db), and have good resources and tutorials.???
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2
my code is working now...
but when i m opening ij(intractive sql), and firing query,
CONNECT 'jdbc:derby:newlogin';

it again showing me error

ERROR XJ040: Failed to start database 'newlogin' with class loader sun.misc.Launcher$AppClassLoader@35ce36, see the next exception for details.
ERROR XSDB6: Another instance of Derby may have already booted the database G:\eclipse projects\derby\PoonaCollegeTest\newlogin.

but no instance of my database is booted..
how do i solved this issue??
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Punit Jain wrote:well my application is not more complex, it just login and store some information of student and then fetches some data from database also and print the report...
that's it....
i m creating this application in java..
any embedded db, which is easier to use(as such i have never used any embedded db), and have good resources and tutorials.???


How can you say you have never used an embedded database when you started this thread on the 24th march:
http://www.coderanch.com/t/571360/JDBC/java/exception-login-page-apache-derby

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1000
    
    2

How can you say you have never used an embedded database when you started this thread on the 24th march:


because still this problem remains with me..
this was my first application with embedded db and, and still i have not resolved all of my issues with this application..
i mean still it's not working properly...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: some queries about standalone application