comparison src/os/windows/vm/os_windows.cpp @ 2130:34d64ad817f4

7009828: Fix for 6938627 breaks visualvm monitoring when -Djava.io.tmpdir is defined Summary: Change get_temp_directory() back to /tmp and %TEMP% like it always was and where the tools expect it to be. Reviewed-by: phh, dcubed, kamg, alanb
author coleenp
date Wed, 12 Jan 2011 13:59:18 -0800
parents c19157304e08
children 63d374c54045
comparison
equal deleted inserted replaced
2129:8f8dfba37802 2130:34d64ad817f4
1042 free(dirp->path); 1042 free(dirp->path);
1043 free(dirp); 1043 free(dirp);
1044 return 0; 1044 return 0;
1045 } 1045 }
1046 1046
1047 // This must be hard coded because it's the system's temporary
1048 // directory not the java application's temp directory, ala java.io.tmpdir.
1047 const char* os::get_temp_directory() { 1049 const char* os::get_temp_directory() {
1048 const char *prop = Arguments::get_property("java.io.tmpdir");
1049 if (prop != 0) return prop;
1050 static char path_buf[MAX_PATH]; 1050 static char path_buf[MAX_PATH];
1051 if (GetTempPath(MAX_PATH, path_buf)>0) 1051 if (GetTempPath(MAX_PATH, path_buf)>0)
1052 return path_buf; 1052 return path_buf;
1053 else{ 1053 else{
1054 path_buf[0]='\0'; 1054 path_buf[0]='\0';