blob: 69a9c66eff886964f4aec77665907dad83acf91a [file] [log] [blame]
---
title: Changing the File Specifications
---
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
You can change all file specifications in the `gemfire.properties` file and at the command line.
**Note:**
<%=vars.product_name%> applications can use the API to pass `java.lang.System` properties to the cluster connection. This changes file specifications made at the command line and in the `gemfire.properties` file. You can verify an applications property settings in the configuration information logged at application startup. The configuration is listed when the `gemfire.properties` `log-level` is set to `config` or lower.
This invocation of the application, `testApplication.TestApp1`, provides non-default specifications for both the `cache.xml` and `gemfire.properties` files:
``` pre
java -Dgemfire.cache-xml-file=\
/gemfireSamples/examples/dist/cacheRunner/queryPortfolios.xml \
-DgemfirePropertyFile=defaultConfigs/gemfire.properties \
testApplication.TestApp1
```
The gfsh start server command can use the same specifications:
``` pre
gfsh>start server \
--J=-Dgemfire.cache-xml-file=/gemfireSamples/examples/dist/cacheRunner/queryPortfolios.xml \
--J=-DgemfirePropertyFile=defaultConfigs/gemfire.properties
```
You can also change the specifications for the `cache.xml` file inside the `gemfire.properties` file.
**Note:**
Specifications in `gemfire.properties` files cannot use environment variables.
Example `gemfire.properties` file with non-default `cache.xml` specification:
``` pre
#Tue May 09 17:53:54 PDT 2006
mcast-address=192.0.2.0
mcast-port=10333
locators=cache-xml-file=/gemfireSamples/examples/dist/cacheRunner/queryPortfolios.xml
```