Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Glauben ist nicht wissen. Wie gesagt, informiere dich halt mal!und sonst bei anderen müsste ich glaub ich bezahlen
import java.io.*;
import java.sql.*;
/**
*
* @author info
*/
public class datenbank1 {
Connection conn = null;
Statement stm = null;
ResultSet rslt = null;
/** Creates a new instance of datenbank1 */
public datenbank1() {
try{
Class.forName("com.mysql.jdbc.Driver");
} catch(Exception e) {
}
try{
conn = DriverManager.getConnection("jdbc:mysql://sql-for-free.de:3306/_85_","maimiman","******");
} catch(Exception e) {e.printStackTrace();
}
try {
stm = conn.createStatement();
}catch(Exception e) {
System.out.println("Folgender Fehler beim erstellen eines Statements : "+e);
e.printStackTrace();
}
}
public ResultSet box1Ausgabe(){
try {
rslt = stm.executeQuery("Select test1 FROM test");
} catch(Exception e) {
System.out.println("Folgender Fehler beim erstellen der Tabelle/Inserts/Select-Anweisung : "+e);
e.printStackTrace();
}
return rslt;
}
}
<html> <head> </head>
<body bgcolor="#EEEEEE">
<applet code="Main.class" width="1000" height="1000" archive="mysql-connector-java-5.1.5-bin.jar"> </applet></body>
</html>
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2104)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at datenbank1.<init>(datenbank1.java:20)
at Main.<init>(Main.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:778)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2045)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:707)
at sun.applet.AppletPanel.run(AppletPanel.java:361)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission sql-for-free.de resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
at java.net.InetAddress.getAllByName0(InetAddress.java:1128)
at java.net.InetAddress.getAllByName0(InetAddress.java:1109)
at java.net.InetAddress.getAllByName(InetAddress.java:1072)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:246)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2027)
... 24 more
Folgender Fehler beim erstellen eines Statements : java.lang.NullPointerException
java.lang.NullPointerException
at datenbank1.<init>(datenbank1.java:26)
at Main.<init>(Main.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:778)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2045)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:707)
at sun.applet.AppletPanel.run(AppletPanel.java:361)
at java.lang.Thread.run(Thread.java:619)
Folgender Fehler beim erstellen der Tabelle/Inserts/Select-Anweisung : java.lang.NullPointerException
java.lang.NullPointerException
at datenbank1.box1Ausgabe(datenbank1.java:39)
at Main.init(Main.java:130)
at sun.applet.AppletPanel.run(AppletPanel.java:417)
at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
at Main.init(Main.java:132)
at sun.applet.AppletPanel.run(AppletPanel.java:417)
at java.lang.Thread.run(Thread.java:619)