Error: Could not find or load main class sun.applet.AppletViewer [message #1848954] |
Sun, 26 December 2021 16:10  |
Eclipse User |
|
|
|
Hello evrybody, i have to create an applet program using Eclipse
I m using linux :
Version: 2021-09 (4.21.0)
Build id: 20210910-1417
So i create a project :
I use an execution environnement jre : JAVASE-1.8
and i leave all option
New i create a class :
i leave evrything empty :
import java.applet.Applet;
public class myApplet extends Applet {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
and when i lunch my program :
i got this error :
Error: Could not find or load main class sun.applet.AppletViewer
Caused by: java.lang.ClassNotFoundException: sun.applet.AppletViewer
do u know how to fix this error please ?
i can lunch my applet in command line and works with this :
to compile i use this line :
javac --release 8 HelloWorldApplet.java
and i lunch it like this :
appletviewer index.html
but on eclipse not working
in commadn line i can lunch the applet with :
java -version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.10)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.10, mixed mode, sharing)
if someone can explain me how do the same in eclipse please
thanks
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04130 seconds