Welcome! Log In Create A New Profile

Advanced

java.awt.HeadlessException when trying to run reprap

Posted by Roaddog 
java.awt.HeadlessException when trying to run reprap
January 16, 2011 02:43AM
Hey everyone. I am trying to get the software setup on 64-bit Ubuntu

I installed Sun-java and followed the directions to install native 64-bit rxtx and java3d libraries.

I did chmod 755 reprap

The libraries are showing up in the directories below:

/usr/lib/jni/libj3dcore-ogl.so

/usr/lib/librxtxSerial.so

I get the following output when I run ./reprap

MachineFactory.create() failed.
java.awt.HeadlessException
Exception in thread "RepRap" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
at java.awt.Window.(Window.java:437)
at java.awt.Frame.(Frame.java:419)
at java.awt.Frame.(Frame.java:384)
at javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1758)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1835)
at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1692)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:864)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:668)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:639)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:610)
at org.reprap.Main$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)


I know this is normally a problem if you are running without a monitor, mouse or keyboard. I have searched around a bit and I'm not sure what could be causing it. I have the Gnome desktop. I even unplugged my USB mouse and used the older PS2 style but I'm not sure where to go from here.

Thanks
Re: java.awt.HeadlessException when trying to run reprap
January 16, 2011 03:27PM
Solved the problem. When I checked my version of Java:

Quote

java -version

it showed Open JDK as the default even though java-6-sun was installed

I typed:

Quote

sudo update-alternatives --config java

I selected java-6-sun

I then received a bunch of errors for no rxtxSerial in java.library.path

I uninstalled and reinstalled and relinked to the libj3dcore-ogl.so and librxtxSerial.so libraries as shown on the installation page on the Wiki and it's now working!
Re: java.awt.HeadlessException when trying to run reprap
January 16, 2011 06:14PM
AFAIK, the packages are tested with OpenJDK, so they should work. Interesting that they are broken.
Sorry, only registered users may post in this forum.

Click here to login