I am trying to link a class from the book “Core Java” that has worked for years.
The class is called “Format”.
When I try to compile, I get the error message:
cannot resolve symbol
symbol: method atof (java.lang.String)
location: class Format

The code that generates this error is:
fYrDefol[j][iDay] = (float)Format.atof(t.nextToken());

I am writing the routine for a Global Warming research project.
The thing is, in a different project I have a routine that makes the exact same call successfully!
Why does this one file not able to make the proper link to the Format class??
Any help would be greatly appreciated.

Recommended Answers

All 4 Replies

Member Avatar for iamthwee

Maybe you have something else in your code which is throwing up an error.

Make sure you are using corejava.Format and not java.text.Format.

I solved this problem by using the command-line compile, i.e., "javac".
There seems to be something wrong with the JBuilder9 link capabilities.

Alternate Solution: JBuilder 9: Under Run/Configurations/Paths, the default path was not set to the working directory (for some strange reason!). Once I changed that, 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.