root/release-kits/shared/search4j/libsearch4j.h @ 15893

Revision 15893, 1.0 KB (checked in by oranfry, 12 years ago)

checking in the header file for libsearch4j

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