This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
The "java" command starts a new JVM to run your specified class. There are other ways to run Java applications, such as
applets, application servers, custom launchers (JNI invocation interface) etc, but the "java" command is the main one to think about, as a beginner.

The JVM started by "java" command will take some memory for its own code, some for its internal data, some for loaded classes, some for stacks for local variables, and some for the heap on which your objects will be stored. There are parameters (e.g. "-Xmx") to the "java" command through which you can control stack size and heap size. The defaults will usually be fine for beginners, however.

To my knowledge, the "java" command cannot be told to take a percentage of the available memory. It's a nice idea - Sun, are you listening?! An advanced Java user could write their own launcher to do that, I guess.
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!