File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes No class error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "No class error" Watch "No class error" New topic
Author

No class error

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi,
>
> As per your instructions I downloaded JDK1.2 from the
> web site you had mentioned.
>
> I installed the same & checked it with a small
> program. My program gets compiled without any error &
> I get the command line after I compile. But soon as I
> run the program....it shows an error message " cannot
> find class ".
>
> But I see a class created for the program that I
> complied. Pls, help me on this.
>
> Thank you & have a nice day.
>
> Lakshmi Sundar.
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20538
    ∞

You might need to set your classpath to point to where your class is.
Do you have a classpath set now?
What operating system are you using?


permaculture Wood Burning Stoves 2.0 - 4-DVD set
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Iam not sure whether the classpath has been set or not. Pls, let me know where I need to go & check.
Iam using windows 98.

Originally posted by Paul Wheaton:
You might need to set your classpath to point to where your class is.
Do you have a classpath set now?
What operating system are you using?

paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20538
    ∞

Open a DOS window and type
SET
and press enter. It should tell you about all of your environment variables. There should be one called CLASSPATH. If there isn't, you need to make one.
I put all of my java source in C:\Java. If you do the same, you should set your classpath like this:
SET CLASSPATH=C:\JAVA
and press enter.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks a lot Mr. Wheaton. I set up the classpath as you told me to and my programs run without any problem now.
Iam very grateful to you for your precious time. Thanks once again.
I would like to ask you one more thing, which is as follows,
Kindly tell me the procedure (ie. the steps involved) to run a java applet.
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
The JDK brings the �appletviewer�. It will scan a text file for the <APPLET> tag and process it. I think it will open a separate window for every APPLET tag that it finds.
One trick I learned from Bruce Eckel is to include commented code like this in the *.java source file:
//<APPLET... CODE=XXX ... >
Then I run the appletviewer on the *.java source file. That way you have the applet test �HTML� code in the same file as the source class without the need for a separate HTML file.
My $0.02

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20538
    ∞

Tony's answer pretty much covers how to get started.
The cattle drive doesn't have any applet stuff, so if you want to learn more, like how to pull your applet up in Netscape, post your question to the applets forum.

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks a lot..... That sure does help me a lot......

[This message has been edited by Jim Yingst (edited March 29, 2000).]
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
YES.....Mr. Wheaton, Tony's answer sure did clear my doubt..
I would also like to know if there is any difference between JAVA and CORE JAVA..... If YES, what is that...PLs, let me know......Thanks.....
Originally posted by Paul Wheaton:
Tony's answer pretty much covers how to get started.
The cattle drive doesn't have any applet stuff, so if you want to learn more, like how to pull your applet up in Netscape, post your question to the applets forum.

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks a lot. Your tips sure did help me a lot. I would like to know one more thing..... Pls, tell me if there is any difference between CORE JAVA and JAVA.
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20538
    ∞

Wow - I'm not sure I can answer that. Core Java is either that lousy series of books or else we're talking about the language without any of the libraries. Or maybe we're talking about Java with the core libraries and not the extended libraries or any third party libraries.
Does this help?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
YES...Ofcourse..... a lot, as I was under the impression that both meant different things.... Now, Iam pretty much clear..Thanks.....
Originally posted by Paul Wheaton:
Wow - I'm not sure I can answer that. Core Java is either that lousy series of books or else we're talking about the language without any of the libraries. Or maybe we're talking about Java with the core libraries and not the extended libraries or any third party libraries.
Does this help?

 
wood burning stoves
 
subject: No class error