java and memory options

D

Dilton McGowan II

On RedHat 9, to make java startup I've found it necessary to supply -Xmx
style option. javac fails to recognize this and still does not start. Is
there a way to globally specify these options?
 
R

Roland

On RedHat 9, to make java startup I've found it necessary to supply -Xmx
style option. javac fails to recognize this and still does not start. Is
there a way to globally specify these options?
Use -J option to pass VM specific parameters, i.e.
$ javac -J-Xmx48m YourClassToCompile.java

See <http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html>

The -J option is also available for most of the other java tools (e.g.
javadoc).
--
Regards,

Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
 
D

Dilton McGowan II

Roland said:
Use -J option to pass VM specific parameters, i.e.
$ javac -J-Xmx48m YourClassToCompile.java

See <http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html>

The -J option is also available for most of the other java tools (e.g.
javadoc).
--
Regards,

Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \

Ok that works, thanks much! A global setting would be nice since you're
comment made me try several java binaries and they all seem to require the
explicit -J option to work.
 
R

Roedy Green

On RedHat 9, to make java startup I've found it necessary to supply -Xmx
style option. javac fails to recognize this and still does not start. Is
there a way to globally specify these options?

in windows you could do it like this, not quite what you want:

set JavaStartOpts=-Xmx....

This is set up in the control panel or the autoexec.bat file in very
old windows versions.


Then on your command line or in your bat file you say:


java %JavaStartOpts% Myclass

At least that way you need change them in only one place.

Presumably red hat has something similar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top