|
|
Re: Elipse necon couldnt recognize assert as key word [message #1782456 is a reply to message #1782304] |
Fri, 23 February 2018 16:19 |
TRAN Manh Bach Tung Messages: 3 Registered: February 2018 |
Junior Member |
|
|
Hi,
I'm very glad that someone answerd my questions.
I think, im speaking of compile errors. When we type some words like protected, public, if else, null, ... color of these words will change, which mean the program recognize them as keyword. But in this case, the color of assert stay the same(black). Maybe its because of my library? I use JDK 1.8 and i read somewhere that assert is defined in JDK 1.4.
I did try solution on internet(enable assertions) by adding -ea in VM argument, but it doesnt work for me.
I will wait ur response and sry for bad english :D
THank you!
|
|
|
Re: Elipse necon couldnt recognize assert as key word [message #1782519 is a reply to message #1782456] |
Sun, 25 February 2018 14:44 |
Stephan Herrmann Messages: 1853 Registered: July 2009 |
Senior Member |
|
|
Quote:I think, im speaking of compile errors. When we type some words like protected, public, if else, null, ... color of these words will change, which mean the program recognize them as keyword. But in this case, the color of assert stay the same(black).
If only the color is the problem, then this is not about a compiler problem, but the editor :) (where syntax coloring takes place).
Quote:I use JDK 1.8 and i read somewhere that assert is defined in JDK 1.4.
That keyword was introduced in 1.4 and is valid in all versions since then.
But actually, it's not the JDK that decides whether Eclipse treats assert as a keyword, but the configuration of your project. What do you see in the project's properties under Java Compiler > JDK Compliance?
|
|
|
|
Powered by
FUDForum. Page generated in 0.08484 seconds