Sorry for confusing the issue by including the Format source code (I did not realize all structure format would be lost on the web site).

The basic issue is this. I have a very small project (3 files). From one routine I can easily make a call to a printing utility routine(Format.java). From another routine I cannot. I have been using the print formatting routine (Format.java) for years. The routine is in the same directory. I am not importing the package. The print() method is not static.

I have tried to copy and paste the code from the routine that makes the call successfully into a "dummy" routine that makes the same call. As soon as I name the new "dummy" routine, the JBuilder compiler gives me the "Cannot Resolve Symbol" error.

Its like using a car key for years and you go out to your car with the same key and suddenly it does not fit in the ignition! It doesn't make sense and seems to defy everything that makes the world a rational place to inhabit!

Recommended Answers

All 9 Replies

Actually, it's not at all the same. You're not working with the same code that has worked before, you are using new code that you have yet to be able to get to work. There is a problem somewhere, you just aren't seeing it. You can always do the old debug method of take what works and modify it to do what the code that doesn't work is supposed to do and see where the code breaks in the process.

As for loosing the formatting, that's why I told you to put the code in CODE tags.

Not sure I understand. Can you provide the line(s) of code causing the error?

JBuilder 9 may have a bug.
When I make Format the main application class and then go back
to the routine in question, Format.print is magically "recognized"
by JBuilder. Perhaps I may need to reload JBuilder? :rolleyes:

Perhaps you need to learn how to use your tools?
Compile the class and JBuilder will see it in other sources. Apparently you'd failed to do that (or provide a compiled version some other way). While often it will see uncompiled sources directly, sometimes it fails. This is especially the case with sources inside your project that change since the last compilation of that source. Sometimes JBuilder fails to see that the source changes and uses the outdated classfile instead for code error insight and/or code completion (or even weirder, sometimes the editor (thus code completion) sees the changes but the compiler does not).

This is true for every IDE/editor I've ever tried, from Eclipse to Netbeans to JBuilder to you name it (I've used well over a dozen over the years, probably closer to 2 dozen).

JBuilder is causing this error? I'd say somethings wrong with your code but you wont post it.

(I've used well over a dozen over the years, probably closer to 2 dozen).

Stop bragging! :lol:

Not bragging, merely making a point. Anyone can say that something is commonplace but unless you've the experience to back up such a statement what's it worth? ;)

I know, I was just messing around :D

Why is the assumption that I am not using the tools correctly?
While I have not used a dozen tools, I did buy the original Cafe from Symantec
8 years ago, have used Visual Cafe versions 1.0, 2.0, 3.0, 3.0b, 3.1, 3.4; Then went
with WebGain's Visual Cafe 4.5, etc.
I said I have been using the Format routine (from the Core Java book) for at least
6 years. On this current project I have compiled it at least 30 times.
It was just through pure frustration that I made it the main class, then switched to
the original class and viola, it worked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.