I'm trying to scale an image on Java. On a spike solution the following code works, nut when installing on the remote Linux server it gives me error 500.
Image scaledImage = img.getScaledInstance(scaledWidth, scaledHeight, Image.SCALE_SMOOTH);
I'm presented the following information:
java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
java.awt.Toolkit$2.run(Toolkit.java:821)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
java.awt.Image.getScaledInstance(Image.java:158)
From what I've seen the might be need to setup a flag on Tomcat/Java concerning to the headless mode. Is there any other solution? If no, how show I setup that flag.
Thanks in advance!