summaryrefslogtreecommitdiff
path: root/stoc/test/javavm
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-04-23 15:15:36 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-04-23 15:15:36 +0000
commit82ff17dcb2b05c77ebb7166b74675b2ba9ab888f (patch)
tree0e4ff4be1f11c1a052e8dca8073afc4c18b8e4c6 /stoc/test/javavm
parentbec617887a47a0a3efecf77f9a77c8694e72b31b (diff)
INTEGRATION: CWS uno2 (1.4.42); FILE MERGED
2003/04/08 13:56:34 dbo 1.4.42.2: #107991# UNO shared library component renaming 2003/04/08 10:46:57 jl 1.4.42.1: #i12929#
Diffstat (limited to 'stoc/test/javavm')
-rw-r--r--stoc/test/javavm/testjavavm.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx
index 4dacb55b8..aa8d95715 100644
--- a/stoc/test/javavm/testjavavm.cxx
+++ b/stoc/test/javavm/testjavavm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: testjavavm.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jl $ $Date: 2002-07-05 09:48:04 $
+ * last change: $Author: rt $ $Date: 2003-04-23 16:15:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -92,12 +92,6 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace com::sun::star::java;
-#if defined(W32)
-#define LIBJEN "jen.dll"
-#elif defined(UNX)
-#define LIBJEN "libjen.so"
-#endif
-
sal_Bool testJavaVM(const Reference< XMultiServiceFactory > & xMgr )
{
@@ -117,6 +111,11 @@ sal_Bool testJavaVM(const Reference< XMultiServiceFactory > & xMgr )
sal_Int8 arId[16];
rtl_getGlobalProcessId((sal_uInt8*) arId);
Any anyVM = xVM->getJavaVM( Sequence<sal_Int8>(arId, 16));
+ if ( ! anyVM.hasValue())
+ {
+ OSL_ENSURE(0,"could not get Java VM");
+ return sal_False;
+ }
sal_Bool b= xreg11->isThreadAttached();
xreg11->registerThread();
@@ -214,7 +213,8 @@ int __cdecl main( int argc, char * argv[] )
OUString sLibLoader( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary"));
- OUString sJenLib( RTL_CONSTASCII_USTRINGPARAM( LIBJEN ));
+ OUString sJenLib(
+ RTL_CONSTASCII_USTRINGPARAM( "javavm.uno" SAL_DLLEXTENSION ) );
xImplReg->registerImplementation(
sLibLoader, sJenLib, Reference< XSimpleRegistry >() );