Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Trying to get the ACM Libraries to work in Eclipse
Trying to get the ACM Libraries to work in Eclipse [message #903742] Sat, 25 August 2012 07:03 Go to next message
Dan Donovan is currently offline Dan Donovan
Messages: 2
Registered: August 2012
Junior Member
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):

import acm.graphics.GLabel;
import acm.program.GraphicsProgram;

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. Wink

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.
Re: Trying to get the ACM Libraries to work in Eclipse [message #903747 is a reply to message #903742] Sat, 25 August 2012 08:04 Go to previous message
Dan Donovan is currently offline Dan Donovan
Messages: 2
Registered: August 2012
Junior Member
I also used the directions from
facwiki.cs.byu.edu/cs142fa10/index.php/Using_the_ACM_library/Eclipse
to no avail.
Previous Topic:3D Animation Company
Next Topic:Trouble in CSS
Goto Forum:
  


Current Time: Sat May 25 06:37:39 EDT 2013

Powered by FUDForum. Page generated in 0.01499 seconds