getenv() returns the results that are not complete.

2 views (last 30 days)
raym
raym on 13 Apr 2019
Commented: raym on 15 Apr 2019
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.
  1 Comment
raym
raym on 15 Apr 2019
The missing part come back after I restart the PC two days later.

Sign in to comment.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!