lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / jvmfwk / plugins / sunmajor / pluginlib / otherjre.cxx
blob034b0687d5e69912fdc9b1a111035dd0733374ec
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <osl/thread.h>
22 #include "otherjre.hxx"
24 using namespace std;
26 using ::rtl::Reference;
27 namespace jfw_plugin
30 Reference<VendorBase> OtherInfo::createInstance()
32 return new OtherInfo;
36 char const* const* OtherInfo::getJavaExePaths(int * size)
38 static char const * ar[] = {
39 #if defined(_WIN32)
40 "bin/java.exe",
41 "jre/bin/java.exe"
42 #elif defined UNX
43 "bin/java",
44 "jre/bin/java"
45 #endif
47 *size = SAL_N_ELEMENTS (ar);
48 return ar;
51 char const* const* OtherInfo::getRuntimePaths(int * size)
53 static char const* ar[]= {
54 #if defined(_WIN32)
55 "/bin/client/jvm.dll",
56 "/bin/hotspot/jvm.dll",
57 "/bin/classic/jvm.dll",
58 "/bin/jrockit/jvm.dll",
59 "/bin/server/jvm.dll" // needed by Azul
60 #elif defined UNX
61 #ifdef MACOSX
62 "/../../../../../Frameworks/JavaVM.framework/JavaVM", //as of 1.6.0_22
63 "/lib/server/libjvm.dylib" // needed by Azul
64 #else
65 "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so", // for Blackdown PPC
66 "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so", // for Blackdown AMD64
67 "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so", // for Blackdown PPC
68 "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so", // for Java of BEA Systems
69 "/bin/classic/libjvm.so", // fallback for older for IBM Java
70 "/jre/bin/classic/libjvm.so" // fallback for older for IBM Java
71 #endif
72 #endif
75 *size = SAL_N_ELEMENTS(ar);
76 return ar;
79 char const* const* OtherInfo::getLibraryPaths(int* size)
82 #if defined(UNX) && !defined(MACOSX)
83 //mac version does not have a ld library path anymore
84 static char const * ar[] = {
85 "/bin",
86 "/jre/bin",
87 "/bin/classic",
88 "/jre/bin/classic",
89 "/lib/" JFW_PLUGIN_ARCH "/client",
90 "/lib/" JFW_PLUGIN_ARCH "/server",
91 "/lib/" JFW_PLUGIN_ARCH "/classic",
92 "/lib/" JFW_PLUGIN_ARCH "/jrockit",
93 "/lib/" JFW_PLUGIN_ARCH "/native_threads",
94 "/lib/" JFW_PLUGIN_ARCH
97 *size = SAL_N_ELEMENTS(ar);
98 return ar;
99 #else
100 *size = 0;
101 return nullptr;
102 #endif
105 int OtherInfo::compareVersions(const OUString& /*sSecond*/) const
107 //Need to provide an own algorithm for comparing version.
108 //Because this function returns always 0, which means the version of
109 //this JRE and the provided version "sSecond" are equal, one cannot put
110 //any excludeVersion entries in the javavendors.xml file.
111 return 0;
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */