Java. Java in path with spaces security. auth. login. Config file

When I execute

System.setProperty("java.security.auth.login.config",ejbLoginConfig);

Using ejbloginconfig = ".. / conf / weblogicdomain. Conf" and my client is in the path containing spaces, I get the classnotfoundexception of EJB call:

Caused by: java.lang.ClassNotFoundException: my.app.MyFassade
    at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.getClassBytes(RemoteBizIntfClassLoader.java:151)
...

If I move everything to a path without spaces, it works Using absolute paths doesn't change anything

Thank you for your idea!

Solution

The value must be enclosed in quotation marks (use escape quotation marks):

System.setProperty("java.security.auth.login.config","\"" + ejbLoginConfig + "\"");
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>