Classpath and loading classes in weblogic

I am trying to create and load dynamic classes in weblogic (10.3.2.0). This is an ADF application that I am deploying to a weblogic server.

When i type

((GenericClassLoader)this.getClass().getClassLoader()).getFinderClassPath() 

I see the path to my directory (of course, not only this path)

 C:\...\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\tmp\_WL_user\test\753the\dynamicClasses 

(I added dynamicClasses directories to the manifest to deploy the WAR profile ). In this directory, I create class files. I checked it, the files there really are created. When I try to load the created class with the same classloader for which I printed the classpath, a ClassNotFoundException is thrown.

He knows the path to the class directory and the jar file, but he does not load classes.

With URLClassLoader, I can load classes. But I need my classes to see classes loaded in the "normal" way.

I can start it correctly only with the CLASSPATH system .

Please do you know the explanation? Is the manifest file in the WAR the wrong place to specify the class path?

Thank you in advance

Qjeta p>

+4
source share
1 answer

Have you tried with a slash

C: ... \ system11.1.1.2.36.55.36 \ DefaultDomain \ servers \ DefaultServer \ tmp_WL_user \ test \ 753the \ dynamicClasses \

Or it only works with jar names if they are specified using the MANIFEST file, and not with the directory name.

0
source

Source: https://habr.com/ru/post/1303914/


All Articles