• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Threads in Thinking in Java

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you use classpath option at the command prompt while compiling the java file?
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic