1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: otherjre.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_jvmfwk.hxx"
34 #include "osl/thread.h"
35 #include "otherjre.hxx"
44 Reference
<VendorBase
> OtherInfo::createInstance()
50 char const* const* OtherInfo::getJavaExePaths(int * size
)
52 static char const * ar
[] = {
53 #if defined(WNT) || defined(OS2)
61 *size
= sizeof (ar
) / sizeof (char*);
65 char const* const* OtherInfo::getRuntimePaths(int * size
)
67 static char const* ar
[]= {
69 "/bin/client/jvm.dll",
70 "/bin/hotspot/jvm.dll",
71 "/bin/classic/jvm.dll",
72 "/bin/jrockit/jvm.dll"
74 "/bin/classic/jvm.dll",
75 "/bin/client/jvm.dll",
76 "/bin/hotspot/jvm.dll"
81 "/lib/" JFW_PLUGIN_ARCH
"/client/libjvm.so", // for Blackdown PPC
82 "/lib/" JFW_PLUGIN_ARCH
"/server/libjvm.so", // for Blackdown AMD64
83 "/lib/" JFW_PLUGIN_ARCH
"/classic/libjvm.so", // for Blackdown PPC
84 "/lib/" JFW_PLUGIN_ARCH
"/jrockit/libjvm.so", // for Java of BEA Systems
85 "/bin/classic/libjvm.so", // fallback for older for IBM Java
86 "/jre/bin/classic/libjvm.so" // fallback for older for IBM Java
91 *size
= sizeof(ar
) / sizeof (char*);
95 char const* const* OtherInfo::getLibraryPaths(int* size
)
99 static char const * ar
[] = {
108 "/lib/" JFW_PLUGIN_ARCH
"/client",
109 "/lib/" JFW_PLUGIN_ARCH
"/server",
110 "/lib/" JFW_PLUGIN_ARCH
"/classic",
111 "/lib/" JFW_PLUGIN_ARCH
"/jrockit",
112 "/lib/" JFW_PLUGIN_ARCH
"/native_threads",
113 "/lib/" JFW_PLUGIN_ARCH
117 *size
= sizeof(ar
) / sizeof (char*);
125 int OtherInfo::compareVersions(const rtl::OUString
& /*sSecond*/) const
127 //Need to provide an own algorithm for comparing version.
128 //Because this function returns always 0, which means the version of
129 //this JRE and the provided version "sSecond" are equal, one cannot put
130 //any excludeVersion entries in the javavendors.xml file.