Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Connecting to a Database in java  (Read 850 times)
0 Members and 1 Guest are viewing this topic.
Offline Swattkidd7

Junior Member





« Posted 2008-03-03 02:56:25 »

Hey everyone, this has been kind of blurry to to me for quite a while. I was wondering, what is needed to connect to a Java database...well not so much as "how do i do it" but for example, I created a program that let you type something, enter it and it sent it to the database and the next time you opened up the program it would read all the strings entered from other people or yourself. It all seemed to work fine until i gave my friend the executable Jar. When he ran it, nothing was displayed, which i guess meant it could not connect to the database (is it because its not local or something?)

But lets put it this way. (this has nothing to do with my old program)

I have a Database on my website (I used CPanel to create it) and I have the JDBC installed (not sure how to make sure i do have it installed but im pretty sure i do) but what is needed now for me to connect to my database?
Offline Jackal von ÖRF

Junior Member





« Reply #1 - Posted 2008-03-03 12:15:12 »

I have a Database on my website (I used CPanel to create it) and I have the JDBC installed (not sure how to make sure i do have it installed but im pretty sure i do) but what is needed now for me to connect to my database?

If the database is provided by a web server hosting company, it's usually behind a firewall (at least it would better be). Connecting to it would require creating a SSH tunnel for the database connection.

Remember that whoever can connect to the database directly, has also the permission drop all tables in the database (and to delete all files on your web site). It's safer to create a PHP-frontend through which your program will access the data in the database.

Offline Swattkidd7

Junior Member





« Reply #2 - Posted 2008-03-04 00:08:20 »

Hmm ill check out that link, but im not sure what you mean by creating a php backend..Do you mean use the PHP file to read and write to the database and read the php file with the java application?
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (4 views)
2014-07-29 12:53:52

Dwinin (7 views)
2014-07-29 10:59:34

E.R. Fleming (20 views)
2014-07-29 03:07:13

E.R. Fleming (8 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (51 views)
2014-07-17 23:47:54
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!