source: main/tags/3.04/search4j/libsearch4j.h

Last change on this file was 18596, checked in by oranfry, 15 years ago

being more explicit about included libraries for te sake of newer linux distros

File size: 1.3 KB
Line 
1#include <cstdlib>
2#include <cstring>
3#include <iostream>
4#include <fstream>
5#include <string>
6#include <sstream>
7#include <sys/stat.h>
8using namespace std;
9#ifdef WINDOWS
10#include <windows.h>
11#endif
12
13
14void replace_all( std::string & str, std::string const & pattern, std::string const & replacement );
15int process( string command, bool render );
16int process_and_catch_output( string command, string &output );
17#ifdef WINDOWS
18int regSearch(HKEY hKey, const char* keyName, int searchType, char* foundJavaVer );
19#endif
20
21
22class Jvm {
23
24 // version string. era.major.minor_update. eg: 1.4.2_02
25 int era;
26 int major;
27 int minor;
28 int update;
29
30 string javaHome;
31 bool isJdk;
32 bool healthy;
33
34 public:
35 Jvm();
36 void setJavaHome( string jh );
37 string getJavaHome();
38 string getExecutable();
39 #ifdef WINDOWS
40 string getWinExecutable();
41 #endif
42 string getVersion();
43 bool check();
44 bool setVersionFromString( string version );
45 int compare( Jvm otherJvm );
46 int getEra();
47 int getMajor();
48 int getMinor();
49 int getUpdate();
50
51 bool getIsJre();
52 bool getIsJdk();
53
54 private:
55 void setVersionFromExeOuput();
56 void setIsJdkFromJavacPresence();
57
58};
59
60
61
62bool find( Jvm &jvm, bool use_minimum, Jvm minimum, bool jreOnly, bool jdeOnly, string phint, string hint, bool verbose );
Note: See TracBrowser for help on using the repository browser.