Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : :
21 : : #include "osl/thread.h"
22 : : #include "otherjre.hxx"
23 : :
24 : : using namespace std;
25 : :
26 : : using ::rtl::OUString;
27 : : using ::rtl::Reference;
28 : : namespace jfw_plugin
29 : : {
30 : :
31 : 0 : Reference<VendorBase> OtherInfo::createInstance()
32 : : {
33 [ # # ]: 0 : return new OtherInfo;
34 : : }
35 : :
36 : :
37 : 0 : char const* const* OtherInfo::getJavaExePaths(int * size)
38 : : {
39 : : static char const * ar[] = {
40 : : #if defined(WNT)
41 : : "bin/java.exe",
42 : : "jre/bin/java.exe"
43 : : #elif UNX
44 : : "bin/java",
45 : : "jre/bin/java"
46 : : #endif
47 : : };
48 : 0 : *size = sizeof (ar) / sizeof (char*);
49 : 0 : return ar;
50 : : }
51 : :
52 : 0 : char const* const* OtherInfo::getRuntimePaths(int * size)
53 : : {
54 : : static char const* ar[]= {
55 : : #if defined(WNT)
56 : : "/bin/client/jvm.dll",
57 : : "/bin/hotspot/jvm.dll",
58 : : "/bin/classic/jvm.dll",
59 : : "/bin/jrockit/jvm.dll"
60 : : #elif UNX
61 : : #ifdef MACOSX
62 : : "/../../../../../Frameworks/JavaVM.framework/JavaVM" //as of 1.6.0_22
63 : : #else
64 : : "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so", // for Blackdown PPC
65 : : "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so", // for Blackdown AMD64
66 : : "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so", // for Blackdown PPC
67 : : "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so", // for Java of BEA Systems
68 : : "/bin/classic/libjvm.so", // fallback for older for IBM Java
69 : : "/jre/bin/classic/libjvm.so" // fallback for older for IBM Java
70 : : #endif
71 : : #endif
72 : :
73 : : };
74 : 0 : *size = sizeof(ar) / sizeof (char*);
75 : 0 : return ar;
76 : : }
77 : :
78 : 0 : char const* const* OtherInfo::getLibraryPaths(int* size)
79 : : {
80 : :
81 : : #if defined(UNX) && !defined(MACOSX)
82 : : //mac version does not have a ld library path anymore
83 : : static char const * ar[] = {
84 : : "/bin",
85 : : "/jre/bin",
86 : : "/bin/classic",
87 : : "/jre/bin/classic",
88 : : "/lib/" JFW_PLUGIN_ARCH "/client",
89 : : "/lib/" JFW_PLUGIN_ARCH "/server",
90 : : "/lib/" JFW_PLUGIN_ARCH "/classic",
91 : : "/lib/" JFW_PLUGIN_ARCH "/jrockit",
92 : : "/lib/" JFW_PLUGIN_ARCH "/native_threads",
93 : : "/lib/" JFW_PLUGIN_ARCH
94 : : };
95 : :
96 : 0 : *size = sizeof(ar) / sizeof (char*);
97 : 0 : return ar;
98 : : #else
99 : : *size = 0;
100 : : return NULL;
101 : : #endif
102 : : }
103 : :
104 : 0 : int OtherInfo::compareVersions(const rtl::OUString& /*sSecond*/) const
105 : : {
106 : : //Need to provide an own algorithm for comparing version.
107 : : //Because this function returns always 0, which means the version of
108 : : //this JRE and the provided version "sSecond" are equal, one cannot put
109 : : //any excludeVersion entries in the javavendors.xml file.
110 : 0 : return 0;
111 : : }
112 : :
113 : : }
114 : :
115 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|