error, can't find class java4cpp/basic/FirstProgram

From: Mark R Rivet (mark.rivet_at_verizon.net)
Date: 05/27/04


Date: Wed, 26 May 2004 23:06:50 GMT

I've installed JDK1.1.5 on my windows 2000 professional system and
when I give it the command ( in a command prompt window) to compile,
it does, but when I try to run the program I get this message:

---------------------------------------------------------------------------------------
C:\java4cpp\basic>java java4cpp.basic.FirstProgram
Can't find class java4cpp/basic/FirstProgram
---------------------------------------------------------------------------------------

The book suggested that I set the classpath, so I tried that with this
command: "set classpath=%classpath%;C:\java4cpp\bin" , which is the
directory on my harddrive that the files are installed to.
The program name is called FirstProgram.java and the
FirstProgram.class are both in the same directory
any help would be appreciated, this is all new to me.
Please forgive my lack of knowledge in the art of java programming.
This is my first encounter.

Thanks in advance, Mark.



Relevant Pages

  • Re: error, cant find class java4cpp/basic/FirstProgram
    ... >since it looks like that's where your placed your package. ... >> when I give it the command (in a command prompt window) to compile, ... >> The book suggested that I set the classpath, so I tried that with this ... >> Please forgive my lack of knowledge in the art of java programming. ...
    (comp.lang.java)
  • Re: about classpath setting
    ... In windows XP and 2000 - right clcik on My Computer.... ... Environment Variables. ... New - "CLASSPATH". ... But this will need to be done for every command prompt window you're ...
    (comp.lang.java.help)