Hi Mikhail, On 8/11/2013 8:00 AM, mikhail cherkasov wrote:
Hi all,I have the following error: c:/jdk/jdk1.6.0_18/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -client -Xmx512m -Xms512m -XX:PermSize=32m -XX:MaxPermSize=160m -Xbootclasspath/p:C:/ws/jdk7/jdk7u-cpu/build/windows-i586/langtools/dist/bootstrap/lib/javac.jar -jar C:/ws/jdk7/jdk7u-cpu/build/windows-i586/langtools/dist/bootstrap/lib/javac.jar -g -Xlint:all -Werror -source 7 -target 7 -encoding ascii -Xbootclasspath:C:/ws/jdk7/jdk7u-cpu/build/windows-i586/classes -sourcepath ../../../../src/closed/windows/classes;../../../../src/closed/share/classes;C:/ws/jdk7/jdk7u-cpu/build/windows-i586/gensrc;../../../../src/windows/classes;../../../../src/share/classes -d C:/ws/jdk7/jdk7u-cpu/build/windows-i586/classes @C:/ws/jdk7/jdk7u-cpu/build/windows-i586/tmp/sun/sun.rmi/.classes.list.filtered ..\..\..\..\src\share\classes\java\io\File.java:2126: warning: [static] static variable should be qualified by type name, File, instead of by an expression s.writeChar(this.separatorChar); // Add the separator character ^ error: warnings found and -Werror specified 1 error 1 warning Could someone help me with this?
As it says this.separatorChar should be File.separatorChar. Java has always permitted (incorrectly in my view) access to static members via references to instances, but now javac is warning about that as it should be phased out.
David
Thanks, Mikhail.
