f



Help, Help, Help

As you can probably gather im in need of help.  I started a basic JAVA
course a week ago as it seems like a very interesting subject.

The problem in having is with the IDE we have been asked to use.  We are
using JCreator, but in order for it to work, we are required to install the
Java software development kit and a class library which comes with the
course book called avi with is a audio visual interface library which is
supposed to make it easier for us to learn the fundimentals of JAVA without
having to worry about the input/output.

Anyways, I have installed the JAVA SDK from SUN website and instaled the
JCreator IDE but it seems to have a problem finding the avi class library as
when i run a basic "Hello World" program as a test, the following error
occurs when i compile the program:

bad class file: C:\JavaClasses\Window.class
class file contains wrong class: avi.Window

Please remove or make sure it appears in the correct subdirectory of the
classpath.

 Window screen = new Window("example1.java","bold","red",72);
        ^
1 error

Process completed.


We where told to create a directory called JavaClass on the root directory
and set the classpath to it.  The other problem is the book tells you how to
set the classpath for the SDK and the avi class library for windows 98 but
im running XP so have kind of guessed on how to set the class path.

Anyone got any ideas as i'm itching to jump into programming in JAVA but
cant until i configure the IDE.

Any help would be much appreciated

Thanx.



0
msne09824 (2)
10/4/2003 1:19:33 PM
comp.lang.java.programmer 52711 articles. 1 followers. Post Follow

4 Replies
2445 Views

Similar Articles

[PageSpeed] 27

Buster wrote:

> As you can probably gather im in need of help.

As you obviously do not know, cross-posting to eight unrelated newsgroups is
a sure way to annoy Usenet regulars. These eight newsgroups are not the
same newsgroup:

comp.compilers.tools.javacc
comp.lang.java.help
comp.lang.java.machine
comp.lang.java.misc
comp.lang.java.programmer
comp.lang.java.setup
comp.lang.java.softwaretools
comp.lang.java.tech

They cover different topics and each has a separate reason for existing.

Choose ONE of the newsgroups. Make ONE post. Await a reply.

-- 
Paul Lutus
http://www.arachnoid.com

0
nospam248 (2592)
10/4/2003 4:05:36 PM
"Buster" <msne09824@blueyonder.co.uk> wrote in message news:<MNzfb.2139$xx2.510@news-binary.blueyonder.co.uk>...
> As you can probably gather im in need of help.  I started a basic JAVA
> course a week ago as it seems like a very interesting subject.
> 
> The problem in having is with the IDE we have been asked to use.  We are
> using JCreator, but in order for it to work, we are required to install the
> Java software development kit and a class library which comes with the
> course book called avi with is a audio visual interface library which is
> supposed to make it easier for us to learn the fundimentals of JAVA without
> having to worry about the input/output.
> 
> Anyways, I have installed the JAVA SDK from SUN website and instaled the
> JCreator IDE but it seems to have a problem finding the avi class library as
> when i run a basic "Hello World" program as a test, the following error
> occurs when i compile the program:
> 
> bad class file: C:\JavaClasses\Window.class
> class file contains wrong class: avi.Window
> 
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
> 
>  Window screen = new Window("example1.java","bold","red",72);
>         ^
> 1 error
> 
> Process completed.
> 
> 
> We where told to create a directory called JavaClass on the root directory
> and set the classpath to it.  The other problem is the book tells you how to
> set the classpath for the SDK and the avi class library for windows 98 but
> im running XP so have kind of guessed on how to set the class path.
> 
> Anyone got any ideas as i'm itching to jump into programming in JAVA but
> cant until i configure the IDE.
> 
> Any help would be much appreciated
> 
> Thanx.


Make sure the name of your java class is the same as the file name,
i.e. Window.java should contain the line: public class Window{...

As far as class path goes, it has always been a nightmare for people
just starting java. From the command line enter:
echo %classpath% 
to get the classpath. In it should be the avi io classes needed for
your hello world. If not, to append directories containing the needed
classes, type
set classpath=%classpath%;<dir>;<dir>;dir;...
If neither of these are the issue try to include some more
information, such as current classpath, code snippets, etc.
Good luck.
0
10/4/2003 5:42:23 PM
Buster wrote:
> when i run a basic "Hello World" program as a test, the following error
> occurs when i compile the program:
> 
> bad class file: C:\JavaClasses\Window.class
> class file contains wrong class: avi.Window
> 
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
> 
>  Window screen = new Window("example1.java","bold","red",72);
>         ^
> 1 error
> 
> Process completed.

   Move Window.class from C:\JavaClasses\Window.class to
C:\JavaClasses\avi\Window.class and you won't get this particular 
message. You will probably get a similar messages

class file contains wrong class: avi.XXXXXX

about classes other than Window, and moving XXXXXX.class from 
C:\JavaClasses\XXXXXX.class to C:\JavaClasses\avi\XXXXXX.class should 
work for those other classes, too.

--Mike Amling

0
Michael
10/4/2003 6:53:01 PM
Try and ensure that the source if provided is not also int the
classpath. This may Conflict class resolution as if it finds the
source first and tries to compiles it in the wrong context(package
spec), you could end up in the situation mentioned.

slipperydan5@yahoo.com (Dan W) wrote in message news:<f9294793.0310040942.2603f5cf@posting.google.com>...
> "Buster" <msne09824@blueyonder.co.uk> wrote in message news:<MNzfb.2139$xx2.510@news-binary.blueyonder.co.uk>...
> > As you can probably gather im in need of help.  I started a basic JAVA
> > course a week ago as it seems like a very interesting subject.
> > 
> > The problem in having is with the IDE we have been asked to use.  We are
> > using JCreator, but in order for it to work, we are required to install the
> > Java software development kit and a class library which comes with the
> > course book called avi with is a audio visual interface library which is
> > supposed to make it easier for us to learn the fundimentals of JAVA without
> > having to worry about the input/output.
> > 
> > Anyways, I have installed the JAVA SDK from SUN website and instaled the
> > JCreator IDE but it seems to have a problem finding the avi class library as
> > when i run a basic "Hello World" program as a test, the following error
> > occurs when i compile the program:
> > 
> > bad class file: C:\JavaClasses\Window.class
> > class file contains wrong class: avi.Window
> > 
> > Please remove or make sure it appears in the correct subdirectory of the
> > classpath.
> > 
> >  Window screen = new Window("example1.java","bold","red",72);
> >         ^
> > 1 error
> > 
> > Process completed.
> > 
> > 
> > We where told to create a directory called JavaClass on the root directory
> > and set the classpath to it.  The other problem is the book tells you how to
> > set the classpath for the SDK and the avi class library for windows 98 but
> > im running XP so have kind of guessed on how to set the class path.
> > 
> > Anyone got any ideas as i'm itching to jump into programming in JAVA but
> > cant until i configure the IDE.
> > 
> > Any help would be much appreciated
> > 
> > Thanx.
> 
> 
> Make sure the name of your java class is the same as the file name,
> i.e. Window.java should contain the line: public class Window{...
> 
> As far as class path goes, it has always been a nightmare for people
> just starting java. From the command line enter:
> echo %classpath% 
> to get the classpath. In it should be the avi io classes needed for
> your hello world. If not, to append directories containing the needed
> classes, type
> set classpath=%classpath%;<dir>;<dir>;dir;...
> If neither of these are the issue try to include some more
> information, such as current classpath, code snippets, etc.
> Good luck.
0
10/30/2003 7:27:19 AM
Reply: