summaryrefslogtreecommitdiff
path: root/stoc/source/javavm/javavm.cxx
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2002-11-14 14:52:06 +0000
committerJoachim Lingner <jl@openoffice.org>2002-11-14 14:52:06 +0000
commitd1cc0edafe520b5bf95fb888f5a390655f06a207 (patch)
treecf7183c832a7bb8f57f45bb92057b48f074bf59b /stoc/source/javavm/javavm.cxx
parentb7c2cddffb3d8a446778041fbe424d9545f523c4 (diff)
#105140# added -ea -Xcheck:jni in non pro office
Diffstat (limited to 'stoc/source/javavm/javavm.cxx')
-rw-r--r--stoc/source/javavm/javavm.cxx32
1 files changed, 26 insertions, 6 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 4e5546e8f880..808c24b1ec7a 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: javavm.cxx,v $
*
- * $Revision: 1.46 $
+ * $Revision: 1.47 $
*
- * last change: $Author: jl $ $Date: 2002-11-13 16:04:20 $
+ * last change: $Author: jl $ $Date: 2002-11-14 15:52:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1098,6 +1098,8 @@ static void getJavaPropsFromConfig(JVM * pjvm,
while(1)
{
ByteSequence seq;
+ sal_Bool bEOF;
+ OUString usProp;
if(pIniFile->readLine(seq) == File::E_None)
{
//check if another Section starts
@@ -1113,6 +1115,14 @@ static void getJavaPropsFromConfig(JVM * pjvm,
//no jvm option, check for property, e.g RuntimeLib=XXX
sal_Int32 len= line.getLength();
const sal_Char *pEnd= pIndex + len;
+ // the line must not start with characters for commenting ';' ' ', etc.
+ if( *pIndex == ';'
+ || *pIndex == '/'
+ || *pIndex == '\''
+ || *pIndex == '#')
+ goto nextLine;
+
+
//the line must not contain spaces or tabs
while( pIndex != pEnd
&& *pIndex != ' '
@@ -1120,14 +1130,13 @@ static void getJavaPropsFromConfig(JVM * pjvm,
&& *pIndex != '=')
pIndex ++;
if(pIndex == pEnd || *pIndex != '=')
- continue; // no '=' found
+ goto nextLine; // no '=' found
}
// Ok, store the line
line.trim();
- OUString usProp= OStringToOUString(line, osl_getThreadTextEncoding());
+ usProp= OStringToOUString(line, osl_getThreadTextEncoding());
pjvm->pushProp(usProp);
-
- sal_Bool bEOF;
+ nextLine:
pIniFile->isEndOfFile(&bEOF);
if(bEOF)
break;
@@ -1413,6 +1422,17 @@ static void initVMConfiguration(JVM * pjvm,
jvm.addSystemClasspath( retrieveComponentClassPath( "UNO_SHARE_PACKAGES_CACHE" ) );
jvm.addUserClasspath( retrieveComponentClassPath( "UNO_USER_PACKAGES_CACHE" ) );
+//For a non product office we use the flags -ea and -Xcheck:jni
+#ifdef _DEBUG
+ if(!getenv( "DISABLE_SAL_DBGBOX" ) )
+ {
+ OUString s=OUString(OUSTR("-ea"));
+ jvm.pushProp(s);
+ jvm.pushProp(OUString(OUSTR("-Xcheck:jni")));
+ }
+#endif
+
+
*pjvm= jvm;
setTimeZone(pjvm);