org.gradle.process.internal.JvmOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-api Show documentation
Show all versions of gradle-api Show documentation
Gradle 6.9.1 API redistribution.
/*
* Copyright 2011 the original author or authors.
*
* Licensed 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.
*/
package org.gradle.process.internal;
import com.google.common.collect.ImmutableSet;
import org.apache.commons.lang.StringUtils;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.file.FileCollection;
import org.gradle.api.internal.file.FileCollectionFactory;
import org.gradle.process.JavaDebugOptions;
import org.gradle.process.JavaForkOptions;
import org.gradle.util.GUtil;
import org.gradle.util.internal.ArgumentsSplitter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class JvmOptions {
private static final String XMS_PREFIX = "-Xms";
private static final String XMX_PREFIX = "-Xmx";
private static final String BOOTCLASSPATH_PREFIX = "-Xbootclasspath:";
public static final String FILE_ENCODING_KEY = "file.encoding";
public static final String USER_LANGUAGE_KEY = "user.language";
public static final String USER_COUNTRY_KEY = "user.country";
public static final String USER_VARIANT_KEY = "user.variant";
public static final String JMX_REMOTE_KEY = "com.sun.management.jmxremote";
public static final String JAVA_IO_TMPDIR_KEY = "java.io.tmpdir";
private static final Logger LOGGER = LoggerFactory.getLogger(JvmOptions.class);
public static final Set IMMUTABLE_SYSTEM_PROPERTIES = ImmutableSet.of(
FILE_ENCODING_KEY, USER_LANGUAGE_KEY, USER_COUNTRY_KEY, USER_VARIANT_KEY, JMX_REMOTE_KEY, JAVA_IO_TMPDIR_KEY
);
// Store this because Locale.default is mutable and we want the unchanged default
// We are assuming this class will be initialized before any code has a chance to change the default
private static final Locale DEFAULT_LOCALE = Locale.getDefault();
private final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy