Java Web Start - jnlp数据库连接

时间:2015-06-29 17:06:44

标签: java mysql java-web-start jnlp

我的JavaWebStart(使用Netbeans)应用程序在apache webserver(localhost)上部署和运行得很好,但是当我将它连接到它的mysql DB时,它只部署但不起作用。但是,它在Netbeans中的连接非常好。

我尝试使用'keytool'登录jar文件,但cmd也无法识别'keytool'。 如何将此应用程序连接到其数据库?

JNLP:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="http://192.168.0.10/JWS2" href="launch.jnlp" spec="1.0+">
<information>
    <title>JavaWebStart2</title>
    <vendor>Administrator</vendor>
    <homepage href=""/>
    <description>JavaWebStart2</description>
    <description kind="short">JavaWebStart2</description>
<offline-allowed/>
</information>
<update check="background"/>
<resources>
    <j2se version="1.8+"/>
    <jar href="JavaWebStart2.jar" main="true"/>
<jar href="lib/mysql-connector-java-5.1.18.jar"/>
</resources>
<application-desc main-class="main.NewJFrame">
</application-desc>
</jnlp>

HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>Test page for launching the application via JNLP</title>
</head>
<body>
    <h3>Test page for launching the application via JNLP</h3>
    <a href="launch.jnlp">Launch the application</a>
    <script src="http://java.com/js/deployJava.js"></script>
    <script>
        deployJava.createWebStartLaunchButton("launch.jnlp")
    </script>
    <!-- Or use the following link element to launch with the application --        
>
    <!--

    -->
</body>
</html>

0 个答案:

没有答案