Remove option from JAVA_OPTIONS using sh script

213 Views Asked by At

So, I have some scripts that are used when I start my server.

I can access and edit some, but there are others that I can't access nor edit.

In my last script, I have the following lines :

JAVA_OPTIONS="${JAVA_OPTIONS} -Denv.name=DEV -Dperf.active=true -DUseSunHttpHandler=true"
export JAVA_OPTIONS

In order to add a few options. But there are some option in JAVA_OPTIONS that I want to remove (it's added in a .sh I don't have access to)

This is the option I want to remove :

-Djava.endorsed.dirs=/produits/weblogic/jdk/jdk1.8.0_45/jre/lib/endorsed:/produits/weblogic/weblogic-12.1.3/wlserver/../oracle_common/modules/endorsed -da

How can I achieve that by editing my last script ?

0

There are 0 best solutions below