I was googling and couldn't quite tell which JDBC driver to download that my search results returned. I'm using the latest version of MySQL (Community Edition) and running Glassfish 3.0 (If that has any relevance?) also I'm using java 6.
Which driver should I download that would be compatible with my current setup? I really did try and do my research but the fact that there are so many different drivers and from difference sources makes it a tad confusing for some.
Thanks in advance!
You could download a JDBC Driver for MySQL (Connector/J).
Related
We have application developed in portlet Factory 5.1 which is using Oracle 9i. we are using ojdbc14.jar for that. we are upgrading the Oracle from 9i to 12c. is this ojdbc.jar supported for Oracle 12c as well? i believe it is compatible. Any Idea?
It is better to use the ojdbc7.jar as oracle suggest it in their supports list.
Also the jar version corresponds to the jdbc version that your j2ee comprises of . So i guess you wont be having any issues with the database upgrade.
But remember you may get the support for only ojdbc7.jar on using 12c Release, it is better to upgrade it!
can you please give the steps how to make simple program of jdbc on mac .
I have eclipse on my mac .so I need steps what to do next so that can able to make program of jdbc ?
I do lot of RND but they provide for windows.But I also download Mysql from this link
http://dev.mysql.com/downloads/file.php?id=450342
and download workbench from this link
http://dev.mysql.com/downloads/file.php?id=412161
Then can you please may I right ?
or what next I have to do to make jdbc program ?
Install and start MySql.
Download the MySql JDBC driver. Try here: http://dev.mysql.com/downloads/connector/j/. Extract all the files and add the jar to your eclipse project.
Now you can start coding. Look up the docs for DriverManager, Statement and ResultSet.
There is not much difference at all in using a Mac than other platforms for working with JDBC.
JDK
You need an implementation of Java, a "JDK". See my answer to another question about installing Java 7 and Java 8 on a Mac, including links for downloading a JDK. Before doing the database stuff, be sure this works in the Terminal.app program: java -version
JDBC Driver
You need a JDBC driver specific to your particular database engine.
H2 Database
I suggest trying the H2 database rather than MySQL, only because it may be a gentler easier way to get started. H2 is pure Java, rather simple in terms of installing and administrating, and free-of-cost. H2 comes with its own JDBC driver. The H2 web site has a quick-start page and a tutorial page. It is not written explicitly for Mac OS X, but you should be able to "translate" as needed.
Oracle Tutorial
Then follow the JDBC tutorial provided by Oracle.
Also: StackOverflow is for specific questions on programming, not general or wide-ranging discussion.
I am using JDK 6, and my present database is MySQL 5.5.27.
As my data is in a tree structure I want to go for a graph database. I have a need for both in-memory and file system based datastore.
Is Neo4j compatible with Java 1.6? On their website and tutorial links, they have stated Java 7 as the requirement.
In the neo4j document it is written that:
Neo4j likes Java 1.6 JVMs and running in server mode so consider upgrading to that if you haven’t yet (or at least give the -server flag).
Details can be found here in neo4j docs.
So, this seems that it is compatible with jdk1.6.
According to the neo4j website as of now, the oldest downloadable version of the community edition is 1.9.9, and the documentation for 1.9.9 says that Oracle Java 7 is a prerequisite.
It may be possible to get older versions (e.g. a 2013 version) but you would be advised to contact Neo4j (the company) to find out a reliable place to get them.
I'm now trying to decide which driver to use to create a DataSource from my JavaEE application to MS SqlServer.
A couple of years ago I had good experience with JTDS, and SO answers suggest that JTDS was a preference back then.
But now I can see that its latest version 1.2.5 is two years old (2009-12-30).
Is it a good enough reason to choose MS proprietary driver, or is JTDS so good that it doesn't require any development anymore? :)
Microsoft JDBC driver is JDBC 4.0 compliant while jTDS is JDBC 3.0.
Here are some new features and improvements introduced in version 4.0 of JDBC.
I'm trying to figure out how to use MySQL with Java EE 6. I'd like to work with it locally on my machine so I can get some experience. Is it possible to do this? I've seen this MySQL Connector and I expected it to be like a class or something, but it's a lot more than that and I'm not sure about how to implement it. Can anyone offer any advice on where to get started? I did find one article that wasn't as detailed as I'd hoped, but it was from 2004 anyways, so it's no longer relevant.
The JDBC Database Access trail in the official Java documentation describes how you access databases from Java. The JDBC Basics Getting Started page says that the tutorial has been tested with MySQL.
You will need to install the MySQL JDBC driver (I presume that's what you've linked to above) and have it on your classpath in order for the database connection to work. But other than having it on your classpath, you shouldn't need to interact with any MySQL-specific classes from your code.
So basically you are using EasyPHP to stand up a MySQL instance on Windows? Seems like a little bit of overkill but in any case here is what you can do:
Download and install Jboss 7 (Full profile).
Run JBoss (/bin/standalone.bat>
Download MySQL connector for Java
Unzip, then copy the MySQL connector Jar to /standalone/deployments
Login to JBoss admin console (http://localhost:8080)
Browse to Connector/Datasources and define a new datasource pointing to your MySQL DB
Thats it for setting up a server environment. Now you can do all your JEE6 goodness in your favorite IDE and deploy the code to your Jboss server. Or you can skip all that and use the baked in goodies in NetBeans. A good tutorial can be followed here.