1

1.) I want to run a Java program on a linux device. It might be a Raspberry Pi, still I'm interested in a more generell solution of my problem, if possible.

2.) This Java program makes use of 3D-graphics. But I don't own any source.

3.) I want to run this program on a low-end machine, but it's not required to "see" the program. The machine will be remote-controlled.

As far as I know when using only the java.awt.* package, a thread called the Event-Dispatching-Thread get's started and every call of the AWT-library is managed by this thread which himself hands those requests to the underlaying operating system.

Since AWT is only a small part of the JFC. What is beneath the Swing components etc. and does the "work"?

Is there a way to make the operating system ignore any of those requests to save system ressources e.g. RAM, CPU, energy consumption?

Edit: I don't like my title, any improvements highly appreciated.

Edit2: With ignore I mean that the operating system just doesn't do any calculations, but without letting the program know about it.

1

You could try making awt run in headless mode by setting the java.awt.headless system property.

For example, if your java program was an executable jar file program.jar, you could start it with:

java -Djava.awt.headless=true -jar program.jar
0

AFAIK Java programs are designed to not be modified at runtime due to security reasons. Check if the program provides any switches try program --help or program -h.

Since you're not having the source code to modify it to your liking, the only thing you can do is to change the niceness or renice the running process. (Or check cpulimit)

There is a chance getting a better answere when you tell us which program you're actually trying to run on your raspi.

Finally there is raspberrypi.stackexchange board which you could check additionally - but don't cross post the same question here and there!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.