This code does not work as I hoped:
Platform plat = new JavaPlatform.Headless(new JavaPlatform.Config());
plat.start()
It seems loop is noop for Headless but even if I overwrite it, that won't activate Net-functionality:
JavaPlatform.Headless plat = new JavaPlatform.Headless(new JavaPlatform.Config()) {
@Override
protected void loop() {
while (true) {
System.out.println("loop!");
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
};
// This code works as expected
Platform plat = new LWJGLPlatform(new LWJGLPlatform.Config());
plat.start()
Is there a technical reason to bind services like Net, Json, etc. to a running Platform and not allow Headless?