0

I have some strange problem. Going through the basic IO tutorial (from Oracle java SE tutorial) I got some problem: my Intellij editor shows red mark on the Path variable. By default there was set 6 version of java, but I changed it on 8 and got nothing. Where is the problem? (with path declaration of with my settings or something else?)

Path path1 = Paths.get("D:\\folder1");

here is rebuild log:

Information:javac 1.8.0_73 was used to compile java sources
Information:21.06.2017 14:48 - Compilation completed successfully with 3 warnings in 3s 704ms
Warning:java: source value 1.5 is obsolete and will be removed in a future release
Warning:java: target value 1.5 is obsolete and will be removed in a future release
Warning:java: To suppress warnings about obsolete options, use -Xlint:-options.

here is the error message of ide:

usage of API documented as @since 1.6+ 

i've rewrite it by hand coz suddenly can't copy it.

class code:

 import java.nio.file.*;


public class Main {


    public static void main(String[] args) {
        Path path1 = Paths.get("D:\\folder1");
    }
}

Project settings window:

enter image description here


I've got it: Project Structure -> Modules ->Sources -> Language Level is help me


NyansusCoder
  • 89
  • 3
  • 14

0 Answers0