util.cxx (ce15f79d) | util.cxx (7a04c6db) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 558 unchanged lines hidden (view full) --- 567 // Get the path to the JavaHome every JRE entry 568 // Find out how long the string for JavaHome is and allocate memory to hold the path 569 if( RegQueryValueExW(hKey, L"JavaHome", 0, &dwType, NULL, &dwTmpPathLen)== ERROR_SUCCESS) 570 { 571 char* szTmpPath= (char *) malloc( dwTmpPathLen); 572 // Get the path for the runtime lib 573 if(RegQueryValueExW(hKey, L"JavaHome", 0, &dwType, (unsigned char*) szTmpPath, &dwTmpPathLen) == ERROR_SUCCESS) 574 { | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 558 unchanged lines hidden (view full) --- 567 // Get the path to the JavaHome every JRE entry 568 // Find out how long the string for JavaHome is and allocate memory to hold the path 569 if( RegQueryValueExW(hKey, L"JavaHome", 0, &dwType, NULL, &dwTmpPathLen)== ERROR_SUCCESS) 570 { 571 char* szTmpPath= (char *) malloc( dwTmpPathLen); 572 // Get the path for the runtime lib 573 if(RegQueryValueExW(hKey, L"JavaHome", 0, &dwType, (unsigned char*) szTmpPath, &dwTmpPathLen) == ERROR_SUCCESS) 574 { |
575 // There can be several version entries refering with the same JavaHome,e.g 1.4 and 1.4.1 | 575 // There can be several version entries referring with the same JavaHome,e.g 1.4 and 1.4.1 |
576 OUString usHome((sal_Unicode*) szTmpPath); 577 // check if there is already an entry with the same JavaHomeruntime lib 578 // if so, we use the one with the more accurate version 579 bool bAppend= true; 580 OUString usHomeUrl; 581 if (osl_getFileURLFromSystemPath(usHome.pData, & usHomeUrl.pData) == 582 osl_File_E_None) 583 { --- 681 unchanged lines hidden --- | 576 OUString usHome((sal_Unicode*) szTmpPath); 577 // check if there is already an entry with the same JavaHomeruntime lib 578 // if so, we use the one with the more accurate version 579 bool bAppend= true; 580 OUString usHomeUrl; 581 if (osl_getFileURLFromSystemPath(usHome.pData, & usHomeUrl.pData) == 582 osl_File_E_None) 583 { --- 681 unchanged lines hidden --- |