Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Urgent help needed!! regarding bruceeckel

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
Im stuck in one of the codes that i have been trying to compile. The original code was for an applet and i make use of Bruce Eckel's Console.java to convert it into a standalone application. However, despite me setting the classpath and everything, this error message occurs :
C:\WINDOWS\Desktop\Java\Painter\village\Village.java:336: cannot resolve symbol
symbol : method run (Village,int,int)
location: class com.bruceeckel.swing.Console
Console.run(new Village(),500,500);
can someone be soo kind enough to reply asap???
THANKS ALOT!!
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about that particular console-class, but common things to look for would be:
1) Do you have a run-method?
2) Does it take the specified paramters?
3) Is it accessible (what access modifier does it have)?
Have you checked all of the above?
/Mike
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"smiley23",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The compiler is looking for com/bruceeckel/swing/Console.class
Do you HAVE such a directory or package under a directory listed in your classpath for it to find the class in?
Really without seeing the code it is extremely difficult to see the problem.
[This message has been edited by Cindy Glass (edited May 22, 2001).]
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Cindy said, it's really tough to tell without seeing the code. (Especially for me, since I'm a Java Newbie!)
But if this is the line causing the error:
Console.run(new Village(),500,500);
1) Do you have a method called 'run', that accepts these particular parameters?
2) Do you have a method called 'Village'?
If the program is long, perhaps you could post just the relevant sections of code?
Susan
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! thanks for all the replies!
Its me again!
The codes are v long that's y i didnt put them up in the first place. But i found one mistake..
It seems that Console.java can only work for JAva Swing..
n my code happens to be in Java only..
I think thats the reason y it cant work......Sorry for my blunder..
Thanks again!
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are creating an application compile it in SDK 1.2 or higher and you will get swing.
If you are still running in a browser, get the 1.3 plugin from Sun that allows the browser to understand swing.
Any code compiled in "just Java" will run just fine in a version of Java that includes swing.
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic