enhanced classpath detection