Ich bin nur ein Tutorial über das Ausführen von Java Applets und es scheint, dass, in Übereinstimmung mit diesem Dokument https://www.java.com/en/download/help/java_blocked.xml, wenn mein einfaches Applet nicht den folgenden Aspekten folgt, kann ich keine Java Applets ausführen auf JRE.kann keine Applets ausführen
* Unsigned application An application without a certificate (i.e. unsigned apps), or missing application Name and Publisher information are blocked by default. Running this kind of application is potentially unsafe and present higher level of risk. * Self-signed application (Certificate not from trusted authority) An application with self-signed certificate is blocked by default. Applications of this type present the highest level of risk because publisher is not identified and the application may be granted access to personal data on your computer. * Jar file missing Permission Attribute Permissions Attribute verifies that the application requests the permission level that developer specified. If this attribute is not present, it might be possible for an attacker to exploit a user by re-deploying an application that is signed with original certificate and running the application at a different privilege level.
Meine Frage ist: Gibt es eine Workaround zu befolgt, um ein Java Applet einfach zu betreiben?
Hier ist mein Code:
HelloWorldApplet.java
import java.awt.Graphics;
class HelloWorldApplet {
public void paint(Graphics g) {
g.drawString("Hello World!", 5, 25);
}
}
HelloWorldApplet.html
<html>
<head>
<title> Hello! </title>
</head>
<body>
<P> My Java applet says:
<APPLET CODE="HelloWorldApplet.class" WIDTH=150 HEIGHT=25>
</body>
</html>
Obs .: Ich habe auch versucht, die "appletviewer" Binär auf Ubuntu zu verwenden, aber nicht gut ..
Vielen Dank im Voraus!
Applets sind eine totale/meist tote Technologie, also abgesehen davon, dass du nur mit Code herumspielst, schießt du dich selbst in den Fuß mit ihnen. Beachten Sie außerdem, dass Applets bei einer Version über 42 nicht ausgeführt werden, wenn Sie Chrome verwenden. – TheEllis
Ja, ich stimme Ihnen angesichts der Sicherheitsbedenken zu, sogar von Oracle selbst. Ich weiß, dass sie größere Änderungen für das Ganze planen Java, einschließlich Java Applets. Ich habe mich nur gefragt, ob es eine Workaround gibt, nur für Testzwecke, Lernen, das Zeug. – ivanleoncz