Changeset 160 for trunk/src/plugins/platform-launcher
- Timestamp:
- Jun 28, 2009, 5:48:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/platform-launcher/library/eclipseUtil.c
r28 r160 4 4 * which accompanies this distribution, and is available at 5 5 * http://www.eclipse.org/legal/cpl-v10.html 6 * 7 * Contributors: 6 * 7 * Contributors: 8 8 * Kevin Cornell (Rational Software Corporation) 9 9 */ 10 11 10 11 12 12 /* Eclipse Launcher Utility Methods */ 13 13 … … 27 27 28 28 /* Is the given VM J9 */ 29 int isJ9VM( char* vm ) 29 int isJ9VM( char* vm ) 30 30 { 31 31 char *ch = strrchr( vm, (int)dirSeparator ); … … 34 34 else 35 35 ch++; 36 return (str casecmp( ch, "j9" ) == 0);36 return (stricmp( ch, "j9" ) == 0); 37 37 } 38 38 … … 43 43 #include <time.h> 44 44 45 /* Return the JVM version in the format x.x.x 45 /* Return the JVM version in the format x.x.x 46 46 */ 47 47 char* getVMVersion( char *vmPath ) … … 62 62 /* Write java -version output to a temp file */ 63 63 (void) sprintf(cmd,"%s -version 2> %s", vmPath, fileName); 64 (void) system(cmd); 64 (void) system(cmd); 65 65 66 66 fp = fopen(fileName, "r"); … … 85 85 version[numChars] = '\0'; 86 86 } 87 } 87 } 88 88 89 89 return version; … … 91 91 92 92 /* Compare JVM Versions of the form "x.x.x..." 93 * 93 * 94 94 * Returns -1 if ver1 < ver2 95 * Returns 0 if ver1 = ver2 95 * Returns 0 if ver1 = ver2 96 96 * Returns 1 if ver1 > ver2 97 */ 97 */ 98 98 int versionCmp(char *ver1, char *ver2) 99 99 { … … 120 120 if (!dot1 && dot2) /* x < x.y */ 121 121 return -1; 122 122 123 123 if (!dot1 && !dot2) /* x == x */ 124 124 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.