Note that there are some explanatory texts on larger screens.

plurals
  1. POJava program won't run as application in eclipse
    primarykey
    data
    text
    <p>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:</p> <p><code>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)</code></p> <p>Below is the code:</p> <pre><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 &lt; NROWS; i++) { for (int j = 0; j &lt; 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); } } } } </code></pre> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload