• Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads in Thinking in Java

 
Douglas Wolfinger
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,
Many of those program examples in ch 14 in Bruce Eckel's book import the com.bruceeckel.swing package, which is created in Console.java. I have compiled this program, so there is a Console.class in that same subdirectory. However, these are the two error messages I get when I try to compile the Counter programs, which call Console.java.
package com.bruceeckel.swing does not exist
import com.bruceeckel.swing.*;
cannot access Console
bad class file: .\Console.class
class file contains wrong class: com.bruceeckel.swing.Console
Please remove or make sure it appears in the correct subdirectory of the classpath. Console.run(new Counter2 (), 300, 100);
Thanks for any help,
Doug
 
Prabhjyot Singh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you use classpath option at the command prompt while compiling the java file?
 
great veera
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Yep ,even i'm getting the same compilation error.,could anyone tell me why it's giving.
the error which i got is :
d:\test\bruceEckel\Applet1c.java:24: cannot resolve symbol
symbol : method setupClosing (javax.swing.JFrame)
location: class Console
Console.setupClosing(frame);
i checked the classpath settings and the package declaration ,where am i went wrong?
TIA
GV
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!