Solved

class not found compile error

Posted on 2001-08-09
11
166 Views
Last Modified: 2013-11-23
hi,

   Note: newbie on java

  i've found the page
http://java.sun.com/docs/books/tutorial/applet/practical/clientExample.html

i want to try the example but when i compile
  QuoteServer.java an error (Class QouteServerThread not found ....)comes out. the compiler is looking for the QuoteServerThread.Class so i compiled first the QuoteServerThread.java (succesful!) then tried to recompile the QuoteServer.java but same error came out. how can i resolve this? thanks in advance.


ps. i copied the two .java files in my \bin directory and im using jdk1.2
0
Comment
Question by:third
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 4

Expert Comment

by:sdussinger
ID: 6370951
Make sure that your classpath contains your current directory.

In windows:

set CLASSPATH=.;%CLASSPATH%

On Linux:

set CLASSPATH=.:$CLASSPATH; export CLASSPATH


Then try and build them again...

--Steve
0
 
LVL 4

Accepted Solution

by:
sdussinger earned 10 total points
ID: 6370956
Also, when you build the example, build all of the Java files at the same time.

>> javac *.java

This will ensure that all of the dependent classes in the current directory will be built as well.

--Steve
0
 
LVL 92

Expert Comment

by:objects
ID: 6370972
And you don't need to put your Java source files in /bin.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Author Comment

by:third
ID: 6370976
where should i set the classpath?
0
 
LVL 4

Expert Comment

by:sdussinger
ID: 6370987
There are two ways to set the classpath. You can set it from the command line using the syntax I posted earlier.

Or you can set it when you do the compile:

>> javac -cp .;%CLASSPATH% <files> under windows

>> javac -cp .:$CLASSPATH <file> under Linux

--Steve
0
 
LVL 30

Author Comment

by:third
ID: 6371034
now it worked by just using javac *.java !


(bonus) do u think this will run on PWS? do i need anything to install?


earn points here:

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=java&qid=20164282 


  i need your expert's advice.


thanks ..... a lot!!!
0
 
LVL 30

Author Comment

by:third
ID: 6371116
erratum:
 
   earn points here:
should be
   earn MORE points here:



additional 5 points question:
  is there a way to extract .class files from .jar files? in other words, unzip the .jar file.

:)
0
 
LVL 4

Expert Comment

by:sdussinger
ID: 6371128
jar -xf jarfile extract all of the file from the jar.

--Steve
0
 
LVL 30

Author Comment

by:third
ID: 6371182
thanks for the info steve, i'll accept your answers.


about PWS any info? (i'll expect ur comment)


earn MORE points here:

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=java&qid=20164282 


just in case anyone is specializing in java.net


again, thanks. c u on the thread! :)

0
 
LVL 4

Expert Comment

by:sdussinger
ID: 6371199
Just what do you want to do with PWS? I'm not real clear on the question here...

--Steve
0
 
LVL 30

Author Comment

by:third
ID: 6371296
i tested the example given in
     http://java.sun.com/docs/books/tutorial/applet/practical/clientExample.html

this is the link where i got those java sample files. i've followed the directions in setting up the program. the QuoteServer works fine as well as the applet only that the quotes (which should be changing in the applet) doesn't work. i doubt that the PWS has something to do with this since im testing it on my local PC not on a web server. do u think this could be the problem? am i lacking something that i need to install for it to work? hope to hear from u.... hope it's clear, also.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question