when read path environment variable using java, via:
system.getenv("path");
the result less comprehensive when using shell, like:
> echo $path
result using java:
/usr/bin:/bin:/usr/sbin:/sbin
result using shell:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/x11/bin:/usr/texbin
why this? java or shell issue? how can retrieve full path information in java? need take care more?
they should absolutely same if user has been confirmed same in both situations ( eclipse/java junit function + shell ). however, still happen if load path in shell , not saved yet in general system path. os using ?
Comments
Post a Comment