1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
23 #include "sunversion.hxx"
24 #include "diagnostics.h"
31 rtl::Reference
<VendorBase
> SunInfo::createInstance()
36 char const* const* SunInfo::getJavaExePaths(int * size
)
38 static char const * ar
[] = {
49 *size
= SAL_N_ELEMENTS(ar
);
53 char const* const* SunInfo::getRuntimePaths(int * size
)
55 static char const* ar
[]= {
57 "/bin/client/jvm.dll",
58 "/bin/hotspot/jvm.dll",
59 "/bin/classic/jvm.dll",
60 "/bin/jrockit/jvm.dll",
61 // The 64-bit JRE has the jvm in bin/server
63 #elif defined MACOSX && defined X86_64
64 // Oracle Java 7, under /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
65 "/lib/server/libjvm.dylib",
66 "/lib/jli/libjli.dylib"
68 "/lib/" JFW_PLUGIN_ARCH
"/client/libjvm.so",
69 "/lib/" JFW_PLUGIN_ARCH
"/server/libjvm.so",
70 "/lib/" JFW_PLUGIN_ARCH
"/classic/libjvm.so",
71 "/lib/" JFW_PLUGIN_ARCH
"/jrockit/libjvm.so",
72 "/lib/server/libjvm.so"
75 *size
= SAL_N_ELEMENTS(ar
);
79 char const* const* SunInfo::getLibraryPaths(int* size
)
81 #if defined UNX && !defined MACOSX
82 static char const * ar
[] = {
83 "/lib/" JFW_PLUGIN_ARCH
"/client",
84 "/lib/" JFW_PLUGIN_ARCH
"/server",
85 "/lib/" JFW_PLUGIN_ARCH
"/native_threads",
86 "/lib/" JFW_PLUGIN_ARCH
88 *size
= SAL_N_ELEMENTS(ar
);
96 int SunInfo::compareVersions(const OUString
& sSecond
) const
98 OUString sFirst
= getVersion();
100 SunVersion
version1(sFirst
);
101 JFW_ENSURE(version1
, "[Java framework] sunjavaplugin" SAL_DLLEXTENSION
102 " does not know the version: "
103 + sFirst
+ " as valid for a SUN/Oracle JRE.");
104 SunVersion
version2(sSecond
);
106 throw MalformedVersionException();
108 if (version1
== version2
)
110 if (version1
> version2
)
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */