Pregunta

My question is pretty simple. Let's say that this is my entire codebase, and I cannot change it:

import java.awt.*;

public class Example1b extends java.applet.Applet
{
   public static void main(String [] args)
   {
      Frame f = new Frame("Example 1b");

      Example1b ex = new Example1b();

      f.add("Center", ex);

      f.pack();
      f.show();
   }
}

Is there any tricks I can do to make this run on a web server without display? I know that java.applet.Applet won't work in headless mode, so can I stub the awt classes, or do some other trickery?

¿Fue útil?

Solución

An Applet runs in the client's browser, applet viewer or IDE. Some alternatives to headless mode on the server are mentioned here, including JWS, VNC and Xvfb.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top