Understanding logic in CaseInsensitiveComparator

From Unicode Technical Standard: In addition, because of the vagaries of natural language, there are situations where two different Unicode characters have the same uppercase or lowercase So, it’s not enough to compare only uppercase of two characters, because they may have different uppercase and same lowercase Simple brute force check gives some results. Check … Read more

How to change settings for SQL Developer to correctly recognize current version of SDK

In windows 10, I needed to go to following folder and change following product.conf file and set SetJavaHome directive. %APPDATA%\sqldeveloper\<product-version>\product.conf in my machine: C:\Users\ati_o\AppData\Roaming\sqldeveloper\17.4.0\product.conf with following line. SetJavaHome C:\Tools\oraclejdk8 Thanks to comment from @thatjeffsmith, in MacOS or Linux/Unix, go to: $HOME/.sqldeveloper/<product-version>/product.conf to set same SetJavaHome directive.

Reasons and advantages for upgrading to Java 6 for a non-technical decider (at the client)

Java 5 is now well past its end-of-life date. Sun/Oracle will no longer issue public updates to it. Java SE 5.0 is in its Java Technology End of Life (EOL) transition period. The EOL transition period began April 8th, 2007 and will complete October 8th, 2009, when Java SE 5.0 will have reached its End … Read more

UnsupportedClassVersionError: JVMCFRE003 bad major version in WebSphere AS 7

WebSphere Application Server V7 does support Java Platform, Standard Edition (Java SE) 6 (see Specifications and API documentation in the Network Deployment (All operating systems), Version 7.0 Information Center) and it’s since the release V8.5 when Java 7 has been supported. I couldn’t find the Java 6 SDK documentation, and could only consult IBM JVM … Read more

How to set classpath when I use javax.tools.JavaCompiler compile the source?

The javax.tools.JavaCompiler#getTask() method takes an options parameter that allows to set compiler options. The following message describes an easy way to set them in order to access the calling program’s classpath: You need to configure the standard java file manager to know about the jar files(s) – you use the compiler options argument to do … Read more

Java 1.6 – determine symbolic links

The technique used in Apache Commons uses the canonical path to the parent directory, not the file itself. I don’t think that you can guarantee that a mismatch is due to a symbolic link, but it’s a good indication that the file needs special treatment. This is Apache code (subject to their license), modified for … Read more

How to convert java.lang.Object to ArrayList?

You can create a static util method that converts any collection to a Java List public static List<?> convertObjectToList(Object obj) { List<?> list = new ArrayList<>(); if (obj.getClass().isArray()) { list = Arrays.asList((Object[])obj); } else if (obj instanceof Collection) { list = new ArrayList<>((Collection<?>)obj); } return list; } you can also mix the validation below: public … Read more

The JDK is missing and is required to run some NetBeans modules

Find the file [netbeans installation directory]/etc/netbeans.conf Luckily, Linux has a find helper like find /home/ -name “netbeans.conf, in which you can change the /home/ to a location where you want to search. I found it at /usr/local/netbeans-8.1/etc/netbeans.conf Once, you found the file, the following property needs to be set: netbeans_jdkhome=”[jdk_path]” where you can find the … Read more

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