1

Topic: Whence an error cannot access java.lang. StringBuilder;

I will not understand, for some reason in line




    else { 
      throw new RuntimeException ("For some reason at the character" + symb.toString () + "it turned out more than three types"); 
    }



There is an error


"MetQueryLexicAnalyser.java": cannot access java.lang. StringBuilder; java.lang. StringBuilder at line 61, column 75



What could it mean?

2

Re: Whence an error cannot access java.lang. StringBuilder;

Hello, dims12, you wrote:

D> "MetQueryLexicAnalyser.java": cannot access java.lang. StringBuilder; java.lang. StringBuilder at line 61, column 75

D> That it could mean?


Any mash with versions JRE 1.5\1.4

3

Re: Whence an error cannot access java.lang. StringBuilder;

Hello, Blazkowicz, you wrote:

B> Hello, dims12, you wrote:

D>> "MetQueryLexicAnalyser.java": cannot access java.lang. StringBuilder; java.lang. StringBuilder at line 61, column 75

D>> That it could mean?

B> Any mash with versions JRE 1.5\1.4

Aha, at me similar  was when I on the second wtk tried  the fifth ., but that was ., and here it is strange.
sad

4

Re: Whence an error cannot access java.lang. StringBuilder;

Reinstalled JDK. Made so: installed 1.4.12 in one folder, then installed 1.5.9 in another. Then in JBuilder specified for the project the first - does not work. The second - works.

5

Re: Whence an error cannot access java.lang. StringBuilder;

Hello, dims12, you wrote:

D> Reinstalled JDK. Made so: installed 1.4.12 in one folder, then installed 1.5.9 in another. Then in JBuilder specified for the project the first - does not work. The second - works.


Terms "works" and "does not work" are not absolutely clear, but about StringBuilder
here it is clearly told:


Since:
1.5

6

Re: Whence an error cannot access java.lang. StringBuilder;

Hello, fefelov, you wrote:



Terms "works" and "does not work" are not absolutely clear


"Does not work", means there is this strange error at compilation, "works" - means does not arise.

7

Re: Whence an error cannot access java.lang. StringBuilder;

Hello, dims12, you wrote:

D> "does not work", means there is this strange error at compilation, "works" - means does not arise.


Note in the first message neither about compilation nor about JBuilder was not  words. Though about  all probably should  under the error report?
smile

Means so. StringBuilder which appeared in 1.5  uses for string concatenation optimization. Outputs? JBuilder manages to use  1.5 even when you to it you show JDK 1.4.

What to do? To change IDE. A joke. Or wait for the same originals as you which help  with JBuilder, or try  adjustments apropos  which it is used.

8

Re: Whence an error cannot access java.lang. StringBuilder;

Hello, Blazkowicz, you wrote:

B> What to do? To change IDE. A joke. Or wait for the same originals as you which help  with JBuilder, or try  adjustments apropos  which it is used.


There is still a chance that JBuilder starts up that compiler which in path, I  that which in adjustments. It is necessary to look still on path/java_home, etc. at the variable environments.

9

Re: Whence an error cannot access java.lang. StringBuilder;

I understood how to avoid an error. Really, business has been connected with JBuilder. I thought what enough to change jdk in project properties. And it appears, it is necessary to change in TWO places: still it is necessary to specify corresponding JDK adjustments in Build/Java.