/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
} else
{
nResult = g_JavaEvents.nResult_JavaDisabled;
}
} elseif (css::java::JavaVMCreationFailureException e4; anyExc >>= e4)
{
SolarMutexGuard aSolarGuard; if( !g_JavaEvents.bVMCreationFailureHandled )
{ // Java not correctly installed, or damaged
g_JavaEvents.bVMCreationFailureHandled = true; #ifdef MACOSX
OUString sWarning(SvtResId(STR_ERROR_JVMCREATIONFAILED_MAC)); #else
OUString sWarning(SvtResId(STR_ERROR_JVMCREATIONFAILED)); #endif #if !defined(_WIN32) if (OUString javaldx_warn;
osl_getEnvironment(u"javaldx_warn"_ustr.pData, &javaldx_warn.pData)
== osl_Process_E_None
&& !javaldx_warn.isEmpty())
{ // Technical untranslated info
sWarning += "\njavaldx warning: " + javaldx_warn;
} #endif
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(nullptr,
VclMessageType::Warning, VclButtonsType::Ok, sWarning));
xErrorBox->set_title(SvtResId(STR_ERROR_JVMCREATIONFAILED_TITLE));
nResult = xErrorBox->run();
} else
{
nResult = RET_OK;
}
} elseif (css::java::RestartRequiredException e5; anyExc >>= e5)
{
SolarMutexGuard aSolarGuard; if( !g_JavaEvents.bRestartRequiredHandled )
{ // a new JRE was selected, but office needs to be restarted //before it can be used.
g_JavaEvents.bRestartRequiredHandled = true;
svtools::executeRestartDialog(
comphelper::getProcessComponentContext(), nullptr,
svtools::RESTART_REASON_JAVA);
}
nResult = RET_OK;
}
if ( nResult == RET_CANCEL || nResult == RET_NO)
{ // Unknown exception type or user wants to cancel if ( abort.is() )
abort->select();
} else// nResult == RET_OK
{ // User selected OK => retry Java usage if ( retry.is() )
retry->select();
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.