Java Security: Illegal key size or default parameters?

Most likely you don’t have the unlimited strength file installed now. You may need to download this file: Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6 Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 Download Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8 Download (only required for versions before Java … Read more

Constructor cannot be applied to given types?

A subclass does not have to have any constructor with “the same number of parameters in the constructor as the superclass”, but it does have to call some of its superclass’ constructors from its own constructor. If the superclass has a no-arg constructor, it is called by default if an explicit call to a superclass constructor is … Read more

What’s the difference between next() and nextLine() methods from Scanner class?

I always prefer to read input using nextLine() and then parse the string. Using next() will only return what comes before the delimiter (defaults to whitespace). nextLine() automatically moves the scanner down after returning the current line. A useful tool for parsing data from nextLine() would be str.split(“\\s+”). For more information regarding the Scanner class or String class refer to the following links. Scanner: http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html … Read more

Convert array of strings into a string in Java

Java 8+ Use String.join(): Note that arr can also be any Iterable (such as a list), not just an array. If you have a Stream, you can use the joining collector: Legacy (Java 7 and earlier) Alternatively, if you just want a “debug-style” dump of an array: Note that if you’re really legacy (Java 1.4 and earlier) you’ll need to replace StringBuilder there with StringBuffer. Android … Read more

Gradle does not find tools.jar

Found it. System property ‘java.home’ is not JAVA_HOME environment variable. JAVA_HOME points to the JDK, while java.home points to the JRE. See that page for more info. Soo… My problem was that my startpoint was the jre folder (C:\jdk1.6.0_26\jre) and not the jdk folder (C:\jdk1.6.0_26) as I thought(tools.jar is on the C:\jdk1.6.0_26\lib folder ). The compile line in dependencies.gradle … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)