RuntimeEnvironment.java revision 1470
123N/A * The contents of this file are subject to the terms of the 371N/A * Common Development and Distribution License (the "License"). 123N/A * You may not use this file except in compliance with the License. 123N/A * language governing permissions and limitations under the License. 123N/A * When distributing Covered Code, include this CDDL HEADER in each 123N/A * If applicable, add the following below this CDDL HEADER, with the 123N/A * fields enclosed by brackets "[]" replaced with your own identifying 123N/A * information: Portions Copyright [yyyy] [name of copyright owner] 123N/A * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. 123N/A * The RuntimeEnvironment class is used as a placeholder for the current 123N/A * configuration this execution context (classloader) is using. 123N/A * Get the one and only instance of the RuntimeEnvironment 123N/A * @return the one and only instance of the RuntimeEnvironment * Creates a new instance of RuntimeEnvironment. Private to ensure a * Makes testing easier by being able to drop the current env and replace it * Check, whether the running JVM is older than version 1.7 . * @return {@code true} if older than 1.7 public static final boolean isOldJVM() {
* subsequent calls to the RuntimeEnvironment from this thread will use * Validate that I have a Exuberant ctags program I may use. * @return {@code true} if Exuberant ctags could be run. log.
warning(
"No Exuberant Ctags found in PATH!\n" +
"Please use option -c to specify path to a good Exuberant Ctags program\n"+
"Or set it in java system property " * Read an configuration file and set it as the current configuration. * @param file the file to read * @throws IOException if an error occurs * Write the current configuration to a file * @param file the file to write the configuration into * @throws IOException if an error occurs * Write the current configuration to a socket * @param host the host address to receive the configuration * @param port the port to use on the host * @throws IOException if an error occurs * Send the current configuration to the web application [server]. * Set the current configuration for this instance to the given parameter. * Involves invalidating known repositories of the {@link HistoryGuru}. * @param config configuration to set. * Get the current configuration for this instance. * @return the current configuration. * Try to stop the configuration listener thread * Start a thread to listen on a socket to receive new configurations * @param endpoint The socket address to listen on * @return true if the endpoint was available (and the thread was started) log.
info(
"Re-configure request from " +
byte[]
buf =
new byte[
1024];