• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No class error

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 21684
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 21684
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
paul wheaton
Trailboss
Pie
Posts: 21684
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 21684
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic