Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

client & sever direcory under jre

 
Sidh Shah
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In jre, libjvm.so is available within two directories
jre/lib/i386/client & jre/lib/i386/server & both so are differ

So what is client & server for jre ?
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM can be started up in either server or client mode. Server mode is slower to start but is optimised for long running programs such as servers. Client mode starts up more quickly and is optimised for programs that run for a shorter time such as desktop applications.

You can specify which version to run using the -server and -client command line options. The default depends on the specification of the machine you are running on.

How the default is chosen can be found here
[ August 04, 2008: Message edited by: Joanne Neal ]
 
Sidh Shah
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using jre version 1.3 & It does not show any options like to run in client or server mode, though jre lib contains shared object file for both client & server mode.

So, How can i set the client / server mode when there is no options available for mode in java
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My 1.3 JRE has a -server option. You will have to go thru the 1.3 documentation to see how this differs from the classic and hotspot versions. My previous post only applied to Java 1.5 and later.
C:\jdk1.3.1_06\jre\bin>java -?
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)

where options include:
-hotspot to select the "hotspot" VM
-server to select the "server" VM
-classic to select the "classic" VM
If present, the option to select the VM must be first.
The default VM is -hotspot.

-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 and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic