4
votes

I want to add a folder to Weblogic server classpath.

Idea is that, i will place all my property files in this folder.When i deploy my Web-application in weblogic, server will read all properties files from this folder only making application having a single place for all property files.

I have changed the startWebLogic.cmd script and added the below line,But no use.

set CLASSPATH=%CLASSPATH%;C:\Oracle\Middleware\user_projects\domains\my_domain\properties

Iam running my application on windows machine.

Please help me to resolve this issue.

2
How are you loading the properties from your application?fglez

2 Answers

4
votes

It's an old thread though I have the solution; instead of adding classpath into the startWebLogic.cmd add it into setDomainEnv.cmd. I have created a folder properties into the path %DOMAIN_HOME%. For my machine the %DOMAIN_HOME% is actually C:\Users\TapasB\Development\Workspaces\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain.

Then at the bottom of the setDomainEnv.cmd just above the code:

if NOT "%JAVA_VENDOR%"=="BEA" (
    set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%
) else (
    set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%
)

I have added set CLASSPATH=%CLASSPATH%;%DOMAIN_HOME%\properties;

So it looks like:

enter image description here

And this works.

0
votes

To add a folder to the AppClasspath add a line like this to the end of C:\Programme\wls1211_dev\domains\base_domain\bin\setDomainEnv.cmd:

set CLASSPATH=%CLASSPATH%;C:\Programme\wls1211_dev\user_projects\domains\base_domain\config\classpath

This will add the Folder config/classpath to your managed server classpath, so all files located there will be available to your application.