Bug 162563 - Remove remaining Java applet code and references
Summary: Remove remaining Java applet code and references
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, skillJava, topicCleanup
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2024-08-22 13:34 UTC by Hossein
Modified: 2024-08-22 19:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2024-08-22 13:34:48 UTC
Description:
Java Applet was a nice way of running complex applications inside browsers that supported them.
https://en.wikipedia.org/wiki/Java_Applet

This feature was deprecated in 2017 by JEP 289 in Java 9. The plugin was removed from the browsers, and the Java API was eventually removed in 2021 by JEP 398 in Java 17. 

There are many places in Java and C++ code of LibreOffice that handle Java applets. Those parts of the code can be considered dead, and should be removed.

The task here is to find those places of the code that are dedicated to Java applets and remove them gradually.

Code pointer:
To start, you should search for "applet" in the code base:

$ git grep -i applet

Around 600 results are printed. Some of them are unrelated, for example, APPLETURKISH is also listed there, which is obviously unrelated. Also, words in dictionary files (.dic) are not related.

The best way to move forward is to go one module at a time. For example, you can start from bean module. These are the files listed for the bean module:

$ git grep -li applet bean
bean/com/sun/star/comp/beans/CallWatchThread.java
bean/com/sun/star/comp/beans/LocalOfficeConnection.java
bean/com/sun/star/comp/beans/OOoBean.java
bean/test/applet/oooapplet/OOoViewer.java
bean/test/applet/oooapplet/example.html
bean/test/applet/oooapplet/makefile.mk

You need to remove the Makefile(s), Java/C++ source code, related documentation, and also folders that were only containing those files. It is worth mentioning that there is a related ODK example in odk/examples/DevelopersGuide/OfficeBean/ folder.

More information about deprecation of the Java applets can be found here:

JDK 9 Release Notes - Deprecated APIs, Features, and Options
https://www.oracle.com/java/technologies/javase/9-deprecated-features.html

JEP 289: Deprecate the Applet API
https://openjdk.org/jeps/289

JEP 398: Deprecate the Applet API for Removal
https://openjdk.org/jeps/398
Comment 1 Roman Kuznetsov 2024-08-22 19:58:37 UTC
Set to NEW