Articles

Affichage des articles du octobre, 2016

odules:ty:compileJavaWARNING

modules:ty:compileJava WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/Users/---/.gradle/caches/3.0/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages() WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

Ternary If Java

from this int a ; if ( i != 0 && k == 7 ){ a = 10 ; } else a = 3 ; } to this nice one int a = ( i != 0 && k == 7 ) ? 10 : 3 ;

org.eclipse.jst.javaee.web.WebApp

An error has occurred. See error log for more details. org.eclipse.jst.javaee.applicationclient.internal.impl.ApplicationClientImpl cannot be cast to org.eclipse.jst.javaee.web.WebApp

XmlBeanFactory is deprecated

Error Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/core/OrderComparator$OrderSourceProvider at springuate.main.main(main.java:22) Caused by: java.lang.ClassNotFoundException: org.springframework.core.OrderComparator$OrderSourceProvider at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 1 more D:\....\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 0 seconds)  Solution You need just to add the latest JAR spring-core-4.3.3.RELEASE spring-beans-4.3.3.RELEASE commons-logging-1.2

The Guide to Java 9 - (the default methods)

In Java 8 , one of the features was the default methods public interface myInterface { default int divByten ( int . . . numbers ) { return sum ( number) /10 ; } } In Java 9 we can simply have a private interface method:  public interface myInterface { private int divByten ( int . . . numbers ) { return sum ( numbers) /10 ; } }