I am just getting started with Java and Eclipse and I ran across a problem. I copied a program as part of a YouTube class to create a checkerboard. It runs as an applet but not as an application. When I try to run as an application I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Clay\GCMDLN.DLL: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at acm.program.DOSCommandLine.getCommandLine(Program.java:2268)
at acm.program.Program.getCommandLine(Program.java:1477)
at acm.program.Program.main(Program.java:1207)
Below is the code:
/* File CheckerBoard.java
* ----------------------
* This program creates a checkerboard
*/
import acm.graphics.*;
import acm.program.*;
/* This class draws a checkerboard on the graphics window.
* The size of the checkerboard is determined by the
* constants NROWS and NCOLUMNS, and the checkerboard fills
* the verticle space available.
*/
public class CheckerBoard extends GraphicsProgram {
/* Number of rows */
private static final int NROWS = 8;
/* Number of columns */
private static final int NCOLUMNS = 8;
/* Runs the program */
public void run() {
int sqSize = getHeight() / NROWS;
for (int i = 0; i < NROWS; i++) {
for (int j = 0; j < NCOLUMNS; j++)
{
int x = j * sqSize;
int y = i * sqSize;
GRect sq = new GRect (x, y, sqSize, sqSize);
sq.setFilled(((i + j) % 2) != 0);
add (sq);
}
}
}
}
Thanks!