Article:
  Building a Simple Java Application in Mac OS X
Subject:   Can't get past first page....
Date:   2001-08-17 22:08:34
From:   kilishan
When I try to compile the simple main() function, it gives me the following error:


Exception in thread "main": java.class.NoClassDefFoundError: //NineSquares


I have updated to the latest JDK.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Can't get past first page....
    2001-08-20 06:41:51  fatbob [View]

    the command should be (assuming you've followed the article by naming your package 'NineSquares'):

    ~/>java NineSquares.NineSquares

    that is <package name>.<class name>

    make sure that the class you're running is in your classpath either by the top level of the package being in the current directory or setting it on the command line via the -cp flag eg.

    ~/> java -cp path/to/ninesquares NineSquares.NineSquares

    or setting the environment eg.

    ~/>export CLASSPATH=path/to/ninesquares