Example usage for java.lang System setProperty

List of usage examples for java.lang System setProperty

Introduction

In this page you can find the example usage for java.lang System setProperty.

Prototype

public static String setProperty(String key, String value) 

Source Link

Document

Sets the system property indicated by the specified key.

Usage

From source file:org.kurento.test.services.KurentoControlServerManager.java

public KurentoControlServerManager(JsonRpcClient client, int httpPort, String path) {

    this.httpPort = httpPort;
    this.path = path;

    KurentoControlServerApp.setJsonRpcClient(client);

    System.setProperty(KurentoControlServerApp.WEBSOCKET_PORT_PROPERTY, Integer.toString(httpPort));

    System.setProperty(KurentoControlServerApp.WEBSOCKET_PATH_PROPERTY, path);

    context = KurentoControlServerApp.start();
}

From source file:com.medvision360.medrecord.tools.cliclient.ArchetypeUploader.java

public static void setupLogging() {
    SLF4JBridgeHandler.install();//from w w w .jav a  2 s.  c  o m
    System.setProperty("org.restlet.engine.loggerFacadeClass", "org.restlet.ext.slf4j.Slf4jLoggerFacade");
}

From source file:com.sifcoapp.report.util.ReportConfigUtil.java

private static void setCompileTempDir(HttpServletRequest request, String uri) {
    System.setProperty("jasper.reports.compile.temp",
            request.getSession().getServletContext().getRealPath(uri));
}

From source file:de.fhg.igd.swingrcp.SwingRCPUtilities.java

/**
 * Swing setup, should be called before any AWT/Swing Component is created
 *//*from w w w  .ja va  2s.  co m*/
public static void setup() {
    if (!initialized) {
        // set UIManager class loader to allow it to find custom LaFs
        UIManager.put("ClassLoader", SwingRCPUtilities.class.getClassLoader());

        // reduce flicker on Windows
        System.setProperty("sun.awt.noerasebackground", "true");

        // setup look and feel
        setupLookAndFeel();

        initialized = true;
    }
}

From source file:org.apache.ftpserver.config.spring.PropertyPlaceholderTest.java

public void test() throws Throwable {
    System.setProperty("port2", "3333");

    FileSystemXmlApplicationContext ctx = new FileSystemXmlApplicationContext(
            "src/test/resources/spring-config/config-property-placeholder.xml");

    DefaultFtpServer server = (DefaultFtpServer) ctx.getBean("server");

    assertEquals(2222, server.getListener("listener0").getPort());
    assertEquals(3333, server.getListener("listener1").getPort());
}

From source file:com.eryansky.utils.SigarUtil.java

/**
 *  ?CLASSPATH,sigar?dll,so?//from   ww  w .j  a  v a  2 s  . com
 */
private static void resetClasspath() {
    String libPath = System.getProperty("java.library.path");
    String classpath = SigarUtil.class.getResource("/").getPath();
    System.setProperty("java.library.path",
            classpath + File.separator + "sigar" + File.pathSeparator + libPath);
}

From source file:com.impetus.kundera.ycsb.RedisYCSBTest.java

/**
 * @throws java.lang.Exception/*from w w  w.j a  v a2s  .co m*/
 */
@Before
public void setUp() throws Exception {
    // in case property file name is not set as system property.
    System.setProperty("fileName", "src/main/resources/db-redis.properties");
    super.setUp();
}

From source file:com.impetus.kundera.ycsb.Neo4JYCSBTest.java

/**
 * @throws java.lang.Exception/*ww w . j  a va  2  s.c  om*/
 */
@Before
public void setUp() throws Exception {
    // in case property file name is not set as system property.
    System.setProperty("fileName", "src/main/resources/db-neo4j.properties");
    super.setUp();
}

From source file:com.nesscomputing.config.SystemPropertiesTest.java

@Before
public void setUp() {
    ps = new PropertiesSaver(Config.CONFIG_PROPERTY_NAME, Config.CONFIG_LOCATION_PROPERTY_NAME);

    System.setProperty(Config.CONFIG_PROPERTY_NAME, "production:webautostart:db2");
    System.setProperty(Config.CONFIG_LOCATION_PROPERTY_NAME, "classpath:/test-config/legacy");
    cfg = Config.getConfig();//from ww w  .j a  v  a 2  s  .  c o m
}

From source file:com.impetus.kundera.ycsb.MongoDBYCSBTest.java

/**
 * @throws java.lang.Exception/*from   w  w w . j  a  va 2  s .com*/
 */
@Before
public void setUp() throws Exception {
    // in case property file name is not set as system property.
    System.setProperty("fileName", "src/main/resources/db-mongo.properties");
    super.setUp();
}