I am trying to get the ACM Libraries to work in eclipse so I can work through the problems in the "Art and Science of Java" if you are unfamiliar with the libraries they can be found here:
jtf.acm.org/
I worked through the tutorials that came with eclipse and worked out how to get the SWT Hello World program up and running but I seem to be unable to apply the principal I learned in that tutorial to getting a similar type program up and running using the ACM Libraries.
I am trying to run a very simple program(page 25, 'Art and Science of Java' if you want to reference it):
public class HelloWorldACM extends GraphicsProgram {
public void run() {
add(new GLabel("Hello, World", 100, 75));
}
}
And I get a ton of these errors:
Exception in thread "main" java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion(Unknown Source)
at sun.awt.FontConfiguration.readFontConfigFile(Unknown Source)
at sun.awt.FontConfiguration.<init>(Unknown Source)
at sun.awt.windows.WFontConfiguration.<init>(Unknown Source)
at sun.awt.Win32GraphicsEnvironment.createFontConfiguration(Unknown Source)
at sun.java2d.SunGraphicsEnvironment$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.<init>(Unknown Source)
at sun.awt.Win32GraphicsEnvironment.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
at java.awt.Window.init(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at sun.applet.AppletViewer.<init>(Unknown Source)
at sun.applet.StdAppletViewerFactory.createAppletViewer(Unknown Source)
at sun.applet.AppletViewer.parse(Unknown Source)
at sun.applet.AppletViewer.parse(Unknown Source)
at sun.applet.Main.run(Unknown Source)
at sun.applet.Main.main(Unknown Source)
at sun.applet.AppletViewer.main(Unknown Source)
I have added the external jar to the buildpath; or at least I believe I am adding it to the buildpath however I could be wrong. Any help getting through this error would be most appreciated and I am sure it's probably the most newb of newb issues but it's creating a wall between what I want to get accomplished and what I am currently able to get done and I want to smash that wall down.
Thank you for your help. Also feel free to ask for more info and I will try my best to get you what you need.