Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Where does CF 8 store JVM args?

Participant ,
Feb 25, 2010 Feb 25, 2010

Hi,  I just rebuilt a CF 8 server and after installing and configuring reviewed the server settings.  Below is a part of the JVM Details section.

User Home is set to "C:\Documents and Setting\TEMP".  I want to change this to "C:\Documents and Setting\Default User"  but cannot figure how to do this.   Where/how does CF8 store these values.    I checked all of the .config, .properties and .xml files withing the Coldfusion8 folder that was created during the install.

My server is running as a stand-alone server.

Any help would be appreciated.

java Version1.6.0_04 
Java VendorSun Microsystems Inc. 
Java Vendor URLhttp://java.sun.com/ 
Java HomeC:\ColdFusion8\runtime\jre 
Java File EncodingCp1252 
Java Default Localeen_US 
File Separator
Path Separator
Line SeparatorChr(13) 
User NameSYSTEM 
User HomeC:\Documents and Settings\TEMP 
User DirC:\ColdFusion8\runtime\bin 
Java VM Specification Version1.0 
Java VM Specification VendorSun Microsystems Inc. 
Java VM Specification NameJava Virtual Machine Specification 
Java VM Version10.0-b19 
Java VM VendorSun Microsystems Inc. 
Java VM NameJava HotSpot(TM) Server VM 
Java Specification Version1.6 
Java Specification VendorSun Microsystems Inc. 
Java Specification NameJava Platform API Specification 
3.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 25, 2010 Feb 25, 2010

In its jvm.config file, which is - by default - in the [JRun]/bin dir on a multi-server install, and... umm... somewhere else on a stand-alone install.  [ColdFusion]runtime/bin rings a bell, but I never use stand-alone installs, so cannot check, I'm afraid.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 25, 2010 Feb 25, 2010

Thank you for the quick response.  I found a \ColdFusion8\runtime\bin\jvm.config. Below is the contents.

I don't see any of the JVM Details values in the file specifically "User Home".

#
# VM configuration
#
# Where to find JVM, if {java.home}/jre exists then that JVM is used
# if not then it must be the path to the JRE itself
java.home=C:/ColdFusion8/runtime/jre
#
# If no java.home is specified a VM is located by looking in these places in this
# order:
#
#  1) bin directory for java.dll (windows) or lib/<ARCH>/libjava.so (unix)
#  2) ../jre
#  3) registry (windows only)
#  4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
#

# Arguments to VM
java.args=-server -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../  -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/cfform/jars -Dcoldfusion.libPath={application.home}/../lib

#
# commas will be converted to platform specific separator and the result will be passed
# as -Djava.ext.dirs= to the VM
java.ext.dirs={jre.home}/lib/ext

#
# where to find shared libraries
java.library.path={application.home}/../lib,{application.home}/../jintegra/bin,{application.home}/../jintegra/bin/international
system.path.first=false

#
# set the current working directory - useful for Windows to control
# the default search path used when loading DLLs since it comes
# before system directory, windows directory and PATH
java.user.dir={application.home}/../../lib

# JVM classpath
java.class.path={application.home}/servers/lib,{application.home}/../lib/macromedia_drivers.jar,{application.home}/lib/cfmx_mbean.jar,{application.home}/lib

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 25, 2010 Feb 25, 2010

Yeah.  That's because by default, it uses the default value, ie: it's not specified.  You should just be able to set user.home just like how it's setting java.home.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 25, 2010 Feb 25, 2010

Adam,

I added 'user.home=C:\Documents and Settings\Default User' under the java.home definition in /Coldfusion8/runtime/bin.jvm.config and restarted the server.  No joy!

I also tried 'java.user.home=C:\Documents and Settings\Default User' similiar to the 'java.ext.dir...'

Still get the 'default' value.  Which begs me to ask, where are the default values stored?

thx for you help.

pwp

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 25, 2010 Feb 25, 2010

Maybe try fwd slashes in there. Java's likely to be treating a backslash as an escape char in there.

Are you sure that's the jvm.config your CF instance is using?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 26, 2010 Feb 26, 2010

Tried "user.home=C:/Documents and Settings/Default User"

No joy.

thx again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 27, 2010 Feb 27, 2010

Works for me if I set it as a JVM arg, eg:

-Duser.home=C:/temp/


--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 26, 2010 Feb 26, 2010

You've got CF configured to use the default system account.  Hence it grabbing the temp directory in documents and settings.

Consider assigning the CF service either a domain wide or local account to run under.  It'll then get a user directory assigned to it and it'll use that one from then on.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 26, 2010 Feb 26, 2010

The situation is is we have two identical 2003 servers running Cf8.

One of them has:

User NameSYSTEM 
User HomeC:\Documents and Settings\TEMP 
User DirC:\ColdFusion8\runtime\bin 

The other has:

User NameSYSTEM 
User Home C:\Documents and Settings\Default User  
User DirC:\ColdFusion8\runtime\bin 

Both are using the default system account.

Why is the first set to '\TEMP while the second is set '\Default User'

I am trying to get the first to use '\Default User' but can't find where/how it is defined.

thx for you help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 01, 2010 Mar 01, 2010

I am trying to get the first to use '\Default User' but can't find where/how it is defined.

The default user.home setting is determined by the o/s.  IIRC, there is a slighlty convoluted set of rules determining the initial value. On my XP box, it is the %USERPROFILE% value.  You can dump all evironment variables from CF using:

<cfset env = createObject("Java", "java.lang.System").getEnv()>
<cfdump var="#env#">

From the java.home value it looks like you are using the default jvm and correct jvm.config file. But as mentioned, make sure you are setting that value in the JVM arguments section using:   -Duser.home=....   If you are having problems because the path has a space in it, you could always try using the DOS short name:      C:/DOCUME~1/DEFAUL~1

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 02, 2010 Mar 02, 2010

Thank you for the help.

I am still puzzled as to where and how CF stores and retrieves the non-specified JVM Detail values but I was able to set User Home to "C\Documents and Settings\Default User\ by enclosing it in double quotes. 

I am not sure if the double quotes will cause a problem.

Can someone tell me how CF uses the User Home folder?  I'd like to create test to see if it is working as required.

Thx again

pwp

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 02, 2010 Mar 02, 2010
LATEST
Can someone tell me how CF uses the User Home folder?  I'd
like to create test to see if it is working as required.

The home directory is often used by desktop applications like Eclipse, etcetera. for configuration purposes. I am not sure how, or if, it is used by CF. But this does raise a question .. if you are not sure how it is used, why are you concerned with changing the value?

I am still puzzled as to where and how CF stores and
retrieves the non-specified JVM Detail values

Technically, CF is not really doing any storing. What you are talking about are java system properties. Those are handled by the jvm. When the jvm starts up, it reads information from property files (ie jvm.config) and the current operating system's environment variables to determine the initial values of system properties like "user.home".

In the case of "user.home", if it is not set within jvm.config, the jvm checks the current operating system's environment variables.  The jvm then applies *some* set of rules to determine the default "user.home" directory.  (For example, on my XP box it uses the windows environment variable %USERPROFILE%.)  If you want to know the exact details of the rules applied by the jvm .. you will have to read the java specifications.

Message was edited by: -==cfSearching==-

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources