1

I am creating a piece of software using Java and Eclipse. The software is to be freestanding and not require an internet connection.

The main use of the program requires access to database. I am used to developing for Android where there is an inbuilt MySQL database in every device. Is there a similar thing with Java. I have looked everywhere and have seen references to this kind of thing but have not seen any clear answers. I know there is JDBC, but this seems to be a method of controlling the database rather than creating it.

What I am trying to establish is, is there a pre installed database available to use in Eclipse without any further installation, in the same way as the MySQL Db is available when using Android??

The version of Java I am using is java.runtime.version=1.7.0_40-b43

and I am using Eclipse Kepler Service Release 2

5
  • No you don't. You have to install your DB separately. Commented Sep 10, 2014 at 16:40
  • I know NetBeans has great facilities for this Commented Sep 10, 2014 at 16:42
  • MySQL on Android devices - spooky! Commented Sep 10, 2014 at 16:43
  • 1
    There is no preinstalled DB with eclipse,but oracle provides JAVA DB (Apache Derby) with it's JDK distribution,you can use that. Commented Sep 10, 2014 at 16:45
  • 1
    Its not MySQL on every Android device, its SQLite. You can use SQLite in your standalone java application as well. Just download one file and package it with your application. Commented Sep 10, 2014 at 17:13

2 Answers 2

2

What I am trying to establish is, is there a pre installed database available to use in Eclipse without any further installation, in the same way as the MySQL Db is available when using Android??

First, Android includes SQLite (not mysql). Second, No. No there is not. You could use Derby or SQLite or H2 (or any other pure Java database). As pure Java databases they don't require external installation (but they can be installed externally) and can be run directly in Eclipse.

Sign up to request clarification or add additional context in comments.

Comments

0

Would SQLite work for your purposes? http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

It's not pre-installed, but seems like it might be a good fit otherwise: http://wiki.eclipse.org/Connecting_to_SQLite

Comments

Your Answer

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