summaryrefslogtreecommitdiff
path: root/stoc/source/javavm
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/javavm')
-rw-r--r--stoc/source/javavm/javavm.component35
-rw-r--r--stoc/source/javavm/javavm.cxx37
-rw-r--r--stoc/source/javavm/makefile.mk7
3 files changed, 44 insertions, 35 deletions
diff --git a/stoc/source/javavm/javavm.component b/stoc/source/javavm/javavm.component
new file mode 100644
index 000000000000..f78d8af3ac29
--- /dev/null
+++ b/stoc/source/javavm/javavm.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.stoc.JavaVirtualMachine">
+ <service name="com.sun.star.java.JavaVirtualMachine"/>
+ <singleton name="com.sun.star.java.theJavaVirtualMachine"/>
+ </implementation>
+</component>
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index ad72a64a811c..1ea792270861 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -226,15 +226,10 @@ rtl::OUString serviceGetImplementationName()
"com.sun.star.comp.stoc.JavaVirtualMachine"));
}
-rtl::OUString serviceGetServiceName()
-{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.java.JavaVirtualMachine"));
-}
-
css::uno::Sequence< rtl::OUString > serviceGetSupportedServiceNames()
{
- rtl::OUString aServiceName = serviceGetServiceName();
+ rtl::OUString aServiceName(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.java.JavaVirtualMachine"));
return css::uno::Sequence< rtl::OUString >(&aServiceName, 1);
}
@@ -619,34 +614,6 @@ component_getImplementationEnvironment(sal_Char const ** pEnvTypeName,
*pEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager,
- void * pRegistryKey)
-{
- if (cppu::component_writeInfoHelper(pServiceManager, pRegistryKey,
- aServiceImplementation))
- {
- try
- {
- css::uno::Reference< css::registry::XRegistryKey >(
- reinterpret_cast< css::registry::XRegistryKey * >(
- pRegistryKey)->
- createKey(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.stoc.JavaVirtualMachine"
- "/UNO/SINGLETONS/"
- "com.sun.star.java.theJavaVirtualMachine"))))->
- setStringValue(serviceGetServiceName());
- return true;
- }
- catch (css::uno::Exception &)
- {
- OSL_ENSURE(false, "com.sun.star.uno.Exception caught");
- }
- }
- return false;
-}
-
extern "C" void * SAL_CALL component_getFactory(sal_Char const * pImplName,
void * pServiceManager,
void * pRegistryKey)
diff --git a/stoc/source/javavm/makefile.mk b/stoc/source/javavm/makefile.mk
index 96908d10d1a1..bcd36e69681e 100644
--- a/stoc/source/javavm/makefile.mk
+++ b/stoc/source/javavm/makefile.mk
@@ -85,3 +85,10 @@ all:
.INCLUDE : target.mk
+ALLTAR : $(MISC)/javavm.component
+
+$(MISC)/javavm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ javavm.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_URE_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt javavm.component