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

Revision 17302, 1.1 KB (checked in by oranfry, 11 years ago)

added a priority hint option to search4j

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