Jar file and remote mysql connect
I have a jar file that i want anyone run it.The problem is that the code makes a connection to a database (mysql) to my computer.How anyone can connect to my databse in my computer from another pc without the user have to had the java \ mysql connect or hte mysql.Only the java.I try with a jnlp file and the jar file stored in my computer.I have a host name and i have open the port 3306 for mysql and allow remote connections to mysql.Can you help me;;
[461 byte] By [
mummya] at [2007-11-27 6:22:51]

# 2
ok i connect to database like this:
try {
String userName = "username";
String password = "password";
String url = "jdbc:mysql://HOSTNAME/bankloans";
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection(url, userName, password);
} catch (Exception e) {
System.out.prinln(e);
}
The JNPL file
<?xml version="1.0" encoding="Windows-1251"?>
<jnlp
spec="1.0+"
codebase="http://nasikas.ath.cx:8080/bankloans/"
href="BankLoans.jnlp">
<information>
<title>Bank Loans Programme</title>
<vendor>Softlets</vendor>
<description>Bank Loans Programme</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.6+"/>
<jar href="BankLoans.jar" main="true"/>
<jar href="mysql-connector-java-5.1.0-bin.jar"/>
</resources>
<application-desc main-class="Go"/>
</jnlp>
What is wrong;;
mummya at 2007-7-12 17:40:12 >
