In the past I made a simple product using applet for studying java, but recently when I compiled it to run the past product with JDK11
Caution:Test.java is using or overriding a deprecated API.
Caution:Detail is,-Xlint:Recompile with the deprecation option.`
If you recompile with -Xlint: deprecation
Test.java:3:warning:[deprecation] javax.swing JApplet is not recommended
public class Test extends javax.swing.JApplet {
^
1 warning
I got a sentence saying, and when I tried to open it with applet viewer, I got various errors, and it was an error that I did not understand well just by studying java a little to take the basic information engineer exam, so please check it. For the first time, I learned that applet doesn't work with jdk11 ...
I really wanted to move past productions, so I hurriedly uninstalled jdk11 and reinstalled jdk8 to get applet working. I will summarize the procedure as a memorandum.
First, to uninstall openjdk-11-jdk, do the following: sudo apt-get purge openjdk-\ * icedtea- \ * icedtea6-\ *
When you're done, check with java -version
that there are no such files or directories, then run sudo apt install openjdk-8-jdk
to install ʻopenjdk-8-jdk. .. When completed, check with
java -version` and the installation is complete.
You should not get an error when you compile again.
Recommended Posts