getenv() returns the results that are not complete.

1 次查看(过去 30 天)
On the windows system the environment variable CLASSPATH is:
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;D:\QMDownload\6;
When I open cmd and type "set CLASSPATH" it echos:.
CLASSPATH=.;C:\Program Files\Java\jdk1.7.0_80\lib\dt.jar;C:\Program Files\Java\j
dk1.7.0_80\lib\tools.jar;D:\QMDownload\6
However,() when I type
!set CLASSPATH
in matlab command windows,I get:
.;C:\Program Files\Java\jdk1.7.0_80\lib\dt.jar;C:\Program Files\Java\jdk1.7.0_80\lib\tools.jar;
When I run
getenv('CLASSPATH')
ans =
.;C:\Program Files\Java\jdk1.7.0_80\lib\dt.jar;C:\Program Files\Java\jdk1.7.0_80\lib\tools.jar;
We can see that "D:\QMDownload\6;" was lost in matlab's results.
I'm wondering why the last part was trimed in matlab, even when using system command !.
I'm sure that I have restared matlab for several times after updating the CLASSPATH just to refresh matlab's system enviroment.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by