Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I created a table in an Oracle database on my personal computer.
Then linked it with a Java Application and I am using that table/database to save all the data from the application.
But when I deploy my .jar file and run it from another system, that database is not installed on it.
Can anyone please tell me or guide me what I am suppose to do? In order for the database and the application to work on other systems too.
Thanks
Basically, you'd need some options in your program to allow the user to configure which database server they want to use.
It would be up to them to deploy a server and provision it correctly before they could use your program. Instructions on doing so would be included in the setup documentation for your program.
It's also possible for your program to be able to setup a database on a remote Oracle instance automatically. You would implement an option to allow them to CREATE DATABASE on a configured Oracle instance, which would run provisioning scripts to create all the necessary tables, views, sprocs, etc.
Since these steps create a lot of friction in deploying and using your program, you should also ask yourself if you really need a SQL database for your program. If it's just single user with a small amount of data, you could check into some sort of local DB that runs in proc.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have to create a database having the name Cars using any RDBMS (Oracle, Postgres, MySql, Java DB, etc.).
Then I have to create a user with the name "dbus" and the password "uspass"; and 2 tables.
Can any of you explain to me how I can create a database in intellij? I can't find any options.
I read somewhere that I have to download a database browser, I downloaded it and I don't think I can create a new database. As far as I understand, this "db browser" only establishes a connection to an existing database.
I just want to create a database where I can create some tables. Then with the connection I hope I can handle it.
For most data sources you have to provide the URL of the existing database where you can create tables, etc.
The database needs to already exist and you should use the administrative tools for the corresponding RDBMS to create a database and a user first. Only after that you can connect and work with this database in the IDE.
As far as I know, creating the database directly from IntelliJ IDEA is possible only for the Embedded Apache Derby data source:
P.S. Database plug-in is available only in IntelliJ IDEA Ultimate edition. And same functionality built into their separate product, DataGrip.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to build an E learning app using Java. The GUI will be made using JavaFX and for database I will use MySQL. So far application runs fine on localhost. But I want the application to be multi user. I m a little confused because I ve read different options like client/server and RMI. What would be the best approach in this case? For example, if the database is on another computer, and several clients will run the app (the app will contain both GUI part and database operations part via JDBC) is it ok? Or do I need to separate client part (like GUI) from actual database operations (Server part)? What about RMI? Does it make sense to use RMI in this case?
In the database the app will store user credentials and user progress. I will grateful if someone could help me clarify this
I would NOT recommend exposing the DB to the Internet.
I would recommand implementing an REST-API for the Communication between DB and Client (JavaFX GUI). The big advantage is that you can control which operations can be executed against the DB and which not. I dont now about RIM btw.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
If I have a Java app (not web app, 100% local), that I want to deploy. Do user have to install something extra other than the .jar file if I use a database?
Also good point if anyone can say each case of this 3 different databases : 1. Java DB (Derby), 2. H2, 3. MySQL.
None of them, or if you want to install a database to the client, Java DB is an option included with Java SE distro. You also need a client drivers to make a connection to db. Derby also has an embedded database drivers, which you can embed to the application.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Guy i developt a simple GUI application to access mySQL database program, i created a jar file, everthings works great on my computer , my application could access database greatly, but the problem is when i run this myapplication.jar on others computers, my GUI (application) showed up but can't access the database.
my questions are:
did i have to copy "C:\Program Files\MySQL\MySQL Server 6.0\data\MyDatabase\" files inside my applications folder ?
i've create a manifest file to link myapplication.jar to mysql-connector-java-5.1.17.jar , plus i put mysql-connector-java-5.1.17.jar in same folder, but it seem my application can't access the database on others computers .
The first thing you need to know is how MySQL works. It is a client and a server, which is probably local in this case.
When you bring the application to the other computer, you'll want to install a MySQL server on that machine as well and set it up with the same tables and data(via MySQL backup and restore).
I would become more acquainted with intermediate Java programming and other databases such as DB4) before creating business-critical applications.
You need to connect to sql through that computer. You can either copy your sql on that or you can point it the sql on you computer using the ip path.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
hello I am working on a software product (ie. type of purchase and sell recording software for a shop) build especially for client base, I mean front end application and database should be keep in client machine. I need a feasible solution to provide those package in a one bundle. I am using javafx for frond end, hibernate for relational mapping and mysql (basically opensource like H2, JavaDB) as database.
Q1.Is it feasible for this kind solution?
If not can you suggest me a substitute way.
And if yes, I need those package in one bundle, I mean client don't need to configure database password or other configuration. Can we provide a script or any kind of batch installation which can install jre or jdk, mysql or any opensouce db, our software and configures it automatically (ie. setting up root password). I know Install4j can done the bundle but I need the automated database configuration.
Q2. How can I do this?
I need a some kind of expert opinion.
Thank you.
If you use mysql, installation for you client will be a little bit involved for you and your customer as you will probably need to package the mysql installation package with your app and have your installer invoke the mysql installer.
I'd suggest a lighter weight database than mysql which is written completely in Java. For example h2 as mentioned in your question or hsqldb, both are just a jar with no native portion - this will make distribution and configuration easier. Using Self Contained Application Packaging, the javafx deployment tools can package your app with it's supporting libraries, the hsqldb engine and a jre installation. Hibernate provides all of the database configuration mechanisms you need.