I have a problem here regarding classloading.
I have one main class inside a jar, and another jar. I want the main class to load the other jar file at runtime.

this is the procedure of my classloading:
URL url = new URL("jar:file://" + file.getAbsolutePath() + "!/");
URLClassLoader ucl = new URLClassLoader(new URL[] { url });
Class c = Class.forName("com.mvc.FirstClass", true, ucl);
the package of the main class is com.mvc

inside the jar file, there is one class that is FirstClass. This is the content of that file:
package com.mvc;
import org.hibernate.Session;
public class FirstClass {
the error states that the program couldn't find class "org.hibernate.Session", but actually, the jar that contains org.hibernate.Session is included inside the jar of the main class/in classpath

does anyone here know what happen?