getenv() returns the results that are not complete.

3 Ansichten (letzte 30 Tage)
raym
raym am 13 Apr. 2019
Kommentiert: raym am 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 Kommentar
raym
raym am 15 Apr. 2019
The missing part come back after I restart the PC two days later.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by