How to run a Java Applet

I’ve been trying to find a way to run a java applet with gradle, but I cannot seem to find a good way to do this.

One of the ways I have found would be having a sub project with an Acme MainFrame class and then adding the project adding the sources to its classpath when run.

The other way I had thought of was adding the MainFrame class to the build script, and running it as a task. But that would require the applet sources being added to the gradle classpath, and I can’t seem to find a way to do that.

Does anyone know of an easier way to run an applet?