Reputation: 1045
I'm using eclipse and I'm creating this java applet
but I keep getting below error when I tried to run an applet. I know it's deprecated in the new version (I even tired 1.8) but is there something I can use to make it work?
Error: Could not find or load main class sun.applet.AppletViewer Caused by: java.lang.ClassNotFoundException: sun.applet.AppletViewer
Upvotes: 9
Views: 57542
Reputation: 188
For support of Applets in Netbeans, you can edit the path to your JDK in netbeans config file which is found in /netbeans-8.2/etc/netbeans.conf. Change the line netbeans_jdkhome="" to your JDK 8 e.g netbeans_jdkhome="/usr/java/jdk1.8.0_241-amd64/"
Upvotes: 1
Reputation: 1481
I think you are using jdk-13. However, Applets support jdk-8 and lower.
The current solution for you would be:
After everything here, it should start working. If you encounter the error
Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
you can simply run this command
sudo sed -i -e '/^assistive_technologies=/s/^/#/' /etc/java-*-openjdk/accessibility.properties
Upvotes: 12