I am following a tutorial to teach myself about some mysql techniques, but at the step to use eclipse to connect mysql database, this tutorial says that there should be a database explorer nearby the console window, but I did not find it and I've searched a lot, I did not find it at window->show view either.
My question is how can I get this database explorer in Eclipse.
Thank you, all commentors and visitors, I found data source explorier http://marketplace.eclipse.org/taxonomy/term/3,31
And install oracle Database Tools for Luna, but it seems that this only supports oracle database, so, let me change my question, how can I build database GUI connection to mySQL workbench in eclipse?
Thank you, all commentors and visitors, especially #PM 77-1, I solved the problem with your help,
generally speaking, I need three things to initialize my JDBC tutorial,
1.MySQL
2.Eclipse and a nice plugin as an option
3.JDBC driver, for me it is mysql driver mysql.com/products/connector
use the #PM 77-1 provided tutorial to set up the project to manipulate the database.
But if you need a database GUI in Eclipse like me, you will need a plugin like DBview, my initial one database explorer is no longer in Eclipse. And remember to download the JDBC driver with .jar as the end. It can be find at platform independent version.
Ok that's all.
Related
So, I am trying to set everything up to use MS SQL Server 2017 from IntelliJ IDEA, and so far I've been able to connect the IDE to the Databases (Gotta love DataGrip), I'm able to see the tables and everything:
However, Microsoft hasn't developed a suitable Driver that supports Java 9, other than this.
The thing is, I have no idea how to even try to test what they are working on in that GitHub link; I tried to replicate what you would do to install a Driver for older Java versions (For example, Driver 6.2), but to no avail.
It isn't the Data source config, since if it was that, I wouldn't even be able to see the Employee DB, nor all it's contents. Also, the 'Pepe' table name it's just for testing purposes.
What I'm asking for, is someone who can tell me where or what to do with the .jar files that contain said still-in-development driver, so I can make queries with the JDBC.
The file that Microsoft offered to download and test contains this structure:
target.zip
|
|
|--mssql-jdbc-6.3.6-SNAPSHOT.jre8-preview.jar (For Java 8, I guess)
|--mssql-jdbc-6.3.6-SNAPSHOT.jre9-preview.jar (For Java 9, I guess)
Thanks for any help.
Well, it appears that it was as easy as moving the .jar file to the libraries used by the project.
Since I'm using IntelliJ, all I had to do is follow this perfect guide, select the .jar from Microsoft and works perfectly!
To anyone with similar problems, just download the necessary Driver, move the .jar to the libraries used by your project however you do it with a different IDE, and you're ready.
I'm trying to write a program in Java that will connect to a MongoDB database. I already have the server, port, name, userDB, and username/password of the MongoDB database I'm trying to access.
I wasn't really sure where to start, so after looking around for a bit, I found a Java driver for MongoDB available on GitHub:
https://github.com/mongodb/mongo-java-driver. I downloaded the source code and imported it as a project on Eclipse. The source code for the driver has literally hundreds if not thousands of files. I tried running it as is, and couldn't get the project to compile.
I have no clue where to go from here. There isn't a lot of in-depth instructional material out there for this, and if I took the time to thoroughly inspect all the files in the driver, that could take decades.
You are on the right track here. What you need to do instead of downloading the source code is to download the JAR files or alternatively use Maven which is a dependency management tool.
This is what you will need to install the mongodb driver.
After you have successfully added the dependencies to your project. Use this quick start guide which will step you through the basics.
Here is an example of working with maven.
Don't get disheartened by small trials..there's always decades of documentation to read ;)
Download the .JAR file from here: https://oss.sonatype.org/content/repositories/releases/org/mongodb/mongodb-driver/3.0.0/
You need mongodb-driver-3.0.0.jar from this list.
Once you have that add it as a library dependency in your Eclipse project and you'll be all set.
I have a java application which uses MySQL as its database. In order to deliver the project, I need to convert it to an executable with MySQL included. I have tried exe4j but it doesn't allow to include the database. Please advice. The project is done in Netbeans.
Although it's not being actively developed any longer due to low demand, you can have a look at the MySQL-Connector/MXJ package that's meant for "embedding" your MySQL-database into your application - I recon' it still should be able to do the trick.
But to be honest, the most future-proof solution would be to switch out your database with another option, preferably an in memory database such as H2database or SQLite.
So, i've just finished a small java application, with database and stuff...
I used Netbeans and Mysql, now i want to export my project so i can use it anywhere i want;
any computer, even with no Mysql or Java installed!
So, i've tried some programs like Launch4j or something... but the main problem is, even if i make the .exe file, what's gonna happen with the database? it's located in my PC, so if somebody try to use my application, he can't access to the database, so the application won't work...
In other words...What is the solution that i can use to like "Combine" the database with the application, if it is possible? or create the .exe file with the database...
I hope that my problem is clear, and thank you for your answers :)
You can look at MySQL Connector/MXJ to embed your mysql database in your application.
But be aware that this package is no longer under active development:
Due to very low demand, MySQL
has stopped development and support for Connector/MXJ. Source and
binaries for previously released versions will continue to be
available from archives.
An alternative solutation would be using another database like SQLite, H2 or HSQLDB
You can create an executable jar by exporting your project through eclipse. You can do this by following these steps:
Right click on the Project
Export as Jar file
When you were programming in netbeans did you include the database within netbeans? Here is a guide on how to do this.
https://netbeans.org/kb/docs/ide/mysql.html
Also here is a second guide on how to Packaging and Distributing Java Desktop Applications
https://netbeans.org/kb/docs/java/javase-deploy.html
I hope these help.
If not just go over your step you took to build the app.
if you really want to give your users a good experience, I would suggest you implement a embedded database in your application instead.
Look at: http://www.h2database.com/
It's free and open source and I use it heavily myself.
It supports embedded (where it creates flat database files on the computer), in-memory, and server-mode, where you have the possibility of letting multiple-applications share the same database.
It's just a jar file you include in your application, and then the users wont have to install neither MySQL, have access to MySQL on a network drive or need other database software installed.
(depending on your requirements, it might also be a good idea to look into Hibernate, to have some more abstraction between the different RDBMS).
In order to get a database built-in to the application, consider HSQLDB, which is an in-memory database.
http://hsqldb.org/
It can run entirely in the JVM without any external resources.
Downloaded:
Java EE
Eclipse Indigo EE
mySQL 5.5
From this point I have no idea about how to create a mySQL database directly from eclipse. I've found methods which employ WAMP servers, however I'm not aiming to do it that way.
I believe that the first step lies in somehow configuring mySQL with eclipse/java, but I'm kind of lost at this point, I have no idea on how to proceed.
Note: Given that I'm a beginner to this field of CS, my question might lack necessary details, thus if you feel that way then please let me know, I'll edit my question with more details.
Thankyou.
If more help needed, here's a pictuto that's very clear and goes step by step :
http://books.zkoss.org/wiki/Setup_MySQL_DB_in_Eclipse
Take a look at the following links :
http://forums.mysql.com/read.php?39,91363,91363
http://obscuredclarity.blogspot.com/2009/08/setup-mysql-development-in-eclipse.html
http://www.classes.cs.uchicago.edu/archive/2006/spring/10200-1/mysql/JDBC.pdf
From here :
how to use a MySql database within Eclipse (Specifically this answer)
Try this plugin for eclipse. Works with all oracle/mysql/postgre.
No need of external ide like SQLyog for db operations/queries...
click here to get Toad Plugin for eclipse