Java / MySQL - How to access connection from another class?

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-05-22T14:40:55Z Indexed on 2010/05/22 14:50 UTC
Read the original article Hit count: 128

Filed under:
|
|

I'm just getting my head around java (and OOP for that matter), the only thing I am familiar with is MySQL. I need to keep the DB connection open throughout the duration of the application, as well as a server socket.

I'm not even sure if they both need separate classes, but here's what I have so far:

http://pastebin.com/qzMFFTrY (it wouldn't all go in a code tag)

The variable I need is con for line 86.

© Stack Overflow or respective owner

Related posts about java

Related posts about mysql