Menu

#74 Jmaxheap mulipliers dont work

open
nobody
None
5
2015-01-17
2007-11-06
Paul Taylor
No

Hi, running application on Windows Vista, when I tried to use -Jmaxheap=512m to override the max heap size on my executable my program didnt start.

I then rebuilt the project with the JSmooth Debug Console option enabled, and it turns out the multiplier 'm' is being ignored so I was in effect trying to set a smaller maxmimum heap size than the initial heap size (of 64MB I had defined in the jsmooth file).

I tried the following without success:
512M (cpaital M)
512000k
512000K

but 512000000 did work

I think there are two issues, firstly it ignores the (m,k), secondly unless you enable the console window there is no indication of why the program failed.

You can my attempts in the output below ( the final attempt is successful).

c:\Program Files\Jthink\Jaikoz>jaikoz.exe -Jmaxheap=512m
ResourceManager resource configuration:
- Resource category: JAVA
- Current directory: c:\Program Files\Jthink\Jaikoz\ - Property count: 15
- Property: =<>
- Property: arguments=<>
- Property: classpath=<lib\jaikoz.jar>
- Property: currentdir=<${EXECUTABLEPATH}>
- Property: embedjar=<false>
- Property: initialheap=<67108864>
- Property: javapropertiescount=<0>
- Property: jvmsearch=<registry;javahome;jrepath;jdkpath;exepath;jview>
- Property: mainclassname=<com.jthink.jaikoz.Start>
- Property: maxheap=<512m>
- Property: maxversion=<>
- Property: minversion=<1.6>
- Property: skel_Debug=<1>
- Property: skel_Message=<Java 1.6 has not been found on your computer. Do you want to download it?>
- Property: skel_PressKey=<0>
Now searching the JVM installed on the system...
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: Env-Var JAVA_HOME not defined on this system.
JVM Lookup: Env-Var JRE_HOME not defined on this system.
JVM Lookup: Env-Var JDK_HOME not defined on this system.
Current directory is c:\Program Files\Jthink\Jaikoz\ JSmooth will now try to use the VM in the following order: registry;javahome;jrepath;jdkpath;exepath;jview
------------------------------
Trying to use a JVM defined in the registry (11 available)
VM will be tried in the following order: 1.6.0;1.6.0;1.6.0;1.6.0;1.6.0;1.6.0;1.5.0;1.5.0;1.5.0;1.5.0;1.5.0;
- Trying registry: <C:\Program Files\Java\jre1.6.0_03><C:\Program Files\Java\jre1.6.0_03\bin\client\jvm.dll><1.6.0>
NO JNI SMOOTH ID !!
ClassPath element is c:\Program Files\Jthink\Jaikoz\ + lib\jaikoz.jar
ClassPath element 0=c:\Program Files\Jthink\Jaikoz\lib\jaikoz.jar
COMMAND: <"C:\Program Files\Java\jre1.6.0_03\bin\java.exe" -Xmx512 -Xms67108864 -classpath "c:\Program Files\Jthink\Jaikoz\lib\jaikoz.jar;" com.jthink.jaikoz.St
art "-l2" "-m2" "-f" >
Started successfully
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified

c:\Program Files\Jthink\Jaikoz>jaikoz.exe -Jmaxheap=512M
ResourceManager resource configuration:
- Resource category: JAVA
- Current directory: c:\Program Files\Jthink\Jaikoz\ - Property count: 15
- Property: =<>
- Property: arguments=<>
- Property: classpath=<lib\jaikoz.jar>
- Property: currentdir=<${EXECUTABLEPATH}>
- Property: embedjar=<false>
- Property: initialheap=<67108864>
- Property: javapropertiescount=<0>
- Property: jvmsearch=<registry;javahome;jrepath;jdkpath;exepath;jview>
- Property: mainclassname=<com.jthink.jaikoz.Start>
- Property: maxheap=<512M>
- Property: maxversion=<>
- Property: minversion=<1.6>
- Property: skel_Debug=<1>
- Property: skel_Message=<Java 1.6 has not been found on your computer. Do you want to download it?>
- Property: skel_PressKey=<0>
Now searching the JVM installed on the system...
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: Env-Var JAVA_HOME not defined on this system.
JVM Lookup: Env-Var JRE_HOME not defined on this system.
JVM Lookup: Env-Var JDK_HOME not defined on this system.
Current directory is c:\Program Files\Jthink\Jaikoz\ JSmooth will now try to use the VM in the following order: registry;javahome;jrepath;jdkpath;exepath;jview
------------------------------
Trying to use a JVM defined in the registry (11 available)
VM will be tried in the following order: 1.6.0;1.6.0;1.6.0;1.6.0;1.6.0;1.6.0;1.5.0;1.5.0;1.5.0;1.5.0;1.5.0;
- Trying registry: <C:\Program Files\Java\jre1.6.0_03><C:\Program Files\Java\jre1.6.0_03\bin\client\jvm.dll><1.6.0>
NO JNI SMOOTH ID !!
ClassPath element is c:\Program Files\Jthink\Jaikoz\ + lib\jaikoz.jar
ClassPath element 0=c:\Program Files\Jthink\Jaikoz\lib\jaikoz.jar
COMMAND: <"C:\Program Files\Java\jre1.6.0_03\bin\java.exe" -Xmx512 -Xms67108864 -classpath "c:\Program Files\Jthink\Jaikoz\lib\jaikoz.jar;" com.jthink.jaikoz.St
art "-l2" "-m2" "-f" >
Started successfully
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified

c:\Program Files\Jthink\Jaikoz>jaikoz.exe -Jmaxheap=512000000
ResourceManager resource configuration:
- Resource category: JAVA
- Current directory: c:\Program Files\Jthink\Jaikoz\ - Property count: 15
- Property: =<>
- Property: arguments=<>
- Property: classpath=<lib\jaikoz.jar>
- Property: currentdir=<${EXECUTABLEPATH}>
- Property: embedjar=<false>
- Property: initialheap=<67108864>
- Property: javapropertiescount=<0>
- Property: jvmsearch=<registry;javahome;jrepath;jdkpath;exepath;jview>
- Property: mainclassname=<com.jthink.jaikoz.Start>
- Property: maxheap=<512000000>
- Property: maxversion=<>
- Property: minversion=<1.6>
- Property: skel_Debug=<1>
- Property: skel_Message=<Java 1.6 has not been found on your computer. Do you want to download it?>
- Property: skel_PressKey=<0>
Now searching the JVM installed on the system...
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(5)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: found VM (V(1)(6)(0)) in registry.
JVM Lookup: Env-Var JAVA_HOME not defined on this system.
JVM Lookup: Env-Var JRE_HOME not defined on this system.
JVM Lookup: Env-Var JDK_HOME not defined on this system.
Current directory is c:\Program Files\Jthink\Jaikoz\ JSmooth will now try to use the VM in the following order: registry;javahome;jrepath;jdkpath;exepath;jview
------------------------------
Trying to use a JVM defined in the registry (11 available)
VM will be tried in the following order: 1.6.0;1.6.0;1.6.0;1.6.0;1.6.0;1.6.0;1.5.0;1.5.0;1.5.0;1.5.0;1.5.0;
- Trying registry: <C:\Program Files\Java\jre1.6.0_03><C:\Program Files\Java\jre1.6.0_03\bin\client\jvm.dll><1.6.0>
NO JNI SMOOTH ID !!
ClassPath element is c:\Program Files\Jthink\Jaikoz\ + lib\jaikoz.jar
ClassPath element 0=c:\Program Files\Jthink\Jaikoz\lib\jaikoz.jar
COMMAND: <"C:\Program Files\Java\jre1.6.0_03\bin\java.exe" -Xmx512000000 -Xms67108864 -classpath "c:\Program Files\Jthink\Jaikoz\lib\jaikoz.jar;" com.jthink.jai
koz.Start "-l2" "-m2" "-f" >
Started successfully
debuglogfile is:C:\Users\paul/Jaikoz/Logs/jaikozdebug%u-%g.log
userlogfile is:C:\Users\paul/Jaikoz/Logs/jaikozuser%u-%g.log
^C
c:\Program Files\Jthink\Jaikoz>

Discussion


Log in to post a comment.