summaryrefslogtreecommitdiff
path: root/stoc
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
commite20f8bb4017261e1852c631c157eb5e273dbde86 (patch)
treedef296919a829d3e8c5bf72dc09ed2fb8de3cb63 /stoc
parent025dd432b3f17e5b1ce1ee189bd447238ab8ea00 (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')
-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 1d54556658a3..aafb296514cf 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 >() );