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

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
LVL 5
TrigunaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Is verbose gc supported in that version?
0
TrigunaAuthor Commented:
how do I know that it is supported or not?
0
CEHJCommented:
java

at the command line
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

TrigunaAuthor Commented:
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
CEHJCommented:
>>it is saying unknown command option ....

Are you sure that JVM_ARGS are being passed to the correct JVM?
0
TrigunaAuthor Commented:
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
CEHJCommented:
>>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
CEHJCommented:
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
TrigunaAuthor Commented:
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
CEHJCommented:
Can you post the result of

echo $GNC_JVM_ARGS

and in fact, if possible, the full *shell-expanded* command to Java
0
TrigunaAuthor Commented:
same thing what I told in the above comment.

what is *shell-expanded*??
0
CEHJCommented:
>>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
CEHJCommented:
To a normal java executable, your args should be

-Xms32MB -Xmx32MB -verbose:gc
0
TrigunaAuthor Commented:
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
CEHJCommented:
>>
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
CEHJCommented:
>>-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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TrigunaAuthor Commented:
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
CEHJCommented:
Yep

>>-X        print help on non-standard options

The memory args seem to just the same in 1.3
0
TrigunaAuthor Commented:
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
CEHJCommented:
Yes, it appears to be no different, so AFAICS the arguments should be as i gave earlier
0
TrigunaAuthor Commented:
What way I can pass JVM Arguments ... ?

Because whatever I am currently using it is not accepting Xms and Xmx ...
0
TrigunaAuthor Commented:
can I give compactgc and partialcompactgc options to my jvm ??
0
CEHJCommented:
>>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
TrigunaAuthor Commented:
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
CEHJCommented:
If it *were* correct, that would have to be

set  GNC_JVM_ARGS="-jvm -Xmx32M"

but where does this '-jvm' come from?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.