?
Solved

How to find the JVM Arguments for Java 1.3.1? VERY URGENT!!!

Posted on 2006-04-25
27
Medium Priority
?
1,385 Views
Last Modified: 2007-12-19
Dear Expert,

     I am using IBM OS/2 machine and I am unable to set the JVM parameters for my java program so that I can improve my apps performance. Please help me in this regard.

     -ms and -mx options are working fine but -verbose:gc is not working.

     how can I give the options for compactgc/nocompactgc and how to give gcpolicy  ??

     Please help me in this regard.

Thanks in advance.
Triguna M S
0
Comment
Question by:Triguna
  • 14
  • 11
25 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533520
Is verbose gc supported in that version?
0
 
LVL 5

Author Comment

by:Triguna
ID: 16533532
how do I know that it is supported or not?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533536
java

at the command line
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Author Comment

by:Triguna
ID: 16533552
Oh yes that option is there in the java ...

-verbose[:class|gc|jni]

but If I give that option in my JVM_ARGS .. as

-verbose:gc

it is saying unknown command option ....
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533642
>>it is saying unknown command option ....

Are you sure that JVM_ARGS are being passed to the correct JVM?
0
 
LVL 5

Author Comment

by:Triguna
ID: 16533670
Yes I am making some other calls like ..

GNC_JVM_ARGS = -jvm -ms32MB -jvm -mx32MB

and again if I call with my verbose ...

GNC_JVM_ARGS = -jvm -ms32MB -jvm -mx32MB -verbose:gc

then I am getting the error ... unknown command option....
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533691
>>GNC_JVM_ARGS

Not quite sure what that is but the shell needs to be able to expand that into exactly the form that the jvm expects it or it won't work
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533713
e.g. the JVM *won't* be expecting

-jvm

and for memory settings, it should be getting

-Xmx32MB

and gc should be

-verbose:gc
0
 
LVL 5

Author Comment

by:Triguna
ID: 16533762
That JVM_ARGS is working for my heap size ... it is setting to the heap size I think..

because it is not giving any error as such.

also I tried giving

GNC_JVM_ARGS = -jvm -ms32MB -jvm -mx32MB -jvm -verbose:gc

it does not gave any error but I am not sure whether that will give me the gc calls and all. how to check for the gc call???
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533788
Can you post the result of

echo $GNC_JVM_ARGS

and in fact, if possible, the full *shell-expanded* command to Java
0
 
LVL 5

Author Comment

by:Triguna
ID: 16533832
same thing what I told in the above comment.

what is *shell-expanded*??
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533862
>>what is *shell-expanded*??

It means after expansion (by the shell) of any other variables has occurred

It those exact arguments are being passed to a 'normal' java executable, they probably won't work
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16533951
To a normal java executable, your args should be

-Xms32MB -Xmx32MB -verbose:gc
0
 
LVL 5

Author Comment

by:Triguna
ID: 16533993
Oh sorry I think I didnt mentioned that ...

I am using Java 1.3.1 and my JVM version is 1.3.1.

-Xms and others are Java 1.4 and onwards options....so it didnt work for my system.

that's why I am using -ms and other options which I think it is for 1.3.1.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16534023
>>
Oh sorry I think I didnt mentioned that ...

I am using Java 1.3.1 and my JVM version is 1.3.1.
>>

Well you did - it's in the title of your question ;-)

Can you post here, the result of

java

?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 840 total points
ID: 16534087
>>-Xms and others are Java 1.4 and onwards options....so it didnt work for my system.

I think not. See

http://java.sun.com/j2se/1.3/docs/tooldocs/win32/java.html
0
 
LVL 5

Author Comment

by:Triguna
ID: 16534103
Usage: java [-options] class [args...]
           (to execute a class)
   or  java -jar [-options] jarfile [args...]
           (to execute a jar file)

where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
              set search path for application classes and resources
    -D<name>=<value>
              set a system property
    -verbose[:class|gc|jni]
              enable verbose output
    -version  print product version
    -showversion  print product version and continue
    -? -help  print this help message
    -X        print help on non-standard options
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16534110
Yep

>>-X        print help on non-standard options

The memory args seem to just the same in 1.3
0
 
LVL 5

Author Comment

by:Triguna
ID: 16534286
java -X

-Xbootclasspath:<directories and zip/jar files separated by ;>
                  set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories and zip/jar files separated by ;>
                  append to end of bootstrap class path
-Xbootclasspath/p:<directories and zip/jar files separated by ;>
                  prepend in front of bootstrap class path
-Xcheck:jni       perform additional checks for JNI functions
-Xcheck:nabounds  perform additional checks for JNI array operations
-Xdebug           enable remote debugging
-Xfuture          enable strictest checks, anticipating future default
-Xgcpolicy[:optthruput]|[:optavgpause]
                  control garbage collector behavior
-Xms<size>        set initial Java heap size
-Xmx<size>        set maximum Java heap size
-Xnoagent         disable support for oldjdb debugger
-Xnoclassgc       disable class garbage collection
-Xoss<size>       set maximum Java stack size for any thread
-Xquickstart      used for improving startup time of some Java applications
-Xrs              reduce the use of OS signals
-Xrunhprof[:help]|[:<option>=<value>, ...]
                  perform heap, cpu, or monitor profiling
-Xrunjdwp[:help]|[:<option>=<value>, ...]
                  load debugging libraries to support remote debug applications
-Xss<size>        set maximum native stack size for any thread

The -X options are non-standard and subject to change without notice.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16534309
Yes, it appears to be no different, so AFAICS the arguments should be as i gave earlier
0
 
LVL 5

Author Comment

by:Triguna
ID: 16534352
What way I can pass JVM Arguments ... ?

Because whatever I am currently using it is not accepting Xms and Xmx ...
0
 
LVL 5

Author Comment

by:Triguna
ID: 16534359
can I give compactgc and partialcompactgc options to my jvm ??
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16534404
>>Because whatever I am currently using it is not accepting Xms and Xmx ...

I don't see any evidence that they're being passed correctly as yet.

a. What are you passing currently?
b. What happens when they're passed per my example?
0
 
LVL 5

Author Comment

by:Triguna
ID: 16534417
set GNC_JVM_ARGS=-jvm -ms32MB -mx32MB

and If I set it as
set  GNC_JVM_ARGS=-jvm -Xmx32M

it is saying unknow command.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16534475
If it *were* correct, that would have to be

set  GNC_JVM_ARGS="-jvm -Xmx32M"

but where does this '-jvm' come from?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question