List of usage examples for java.lang System setProperty
public static String setProperty(String key, String value)
From source file:com.xyf.boot.WebApplication.java
public static void main(String[] args) throws Exception { System.setProperty("logging.config", "classpath:conf/logback.xml"); SpringApplication.run(WebApplication.class, args); }
From source file:net.maritimecloud.identityregistry.McIdregApplication.java
public static void main(String[] args) { // Set awt to be headless to avoid issues when scaling images (logos) System.setProperty("java.awt.headless", "true"); // Set Bouncy Castle as Provider, used for Certificates. Security.addProvider(new BouncyCastleProvider()); SpringApplication.run(McIdregApplication.class, args); }
From source file:StringTaggerDemo2.java
public static void main(String args[]) throws Exception { System.setProperty("sen.home", "../Sen1221/senhome-ipadic"); System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "FATAL"); StringTagger tagger = StringTagger.getInstance(); String s = "????"; Token[] token = tagger.analyze(s);/*from www .j a va 2s . c om*/ if (token != null) { show(token); } }
From source file:mytubermiserver.MyTubeRMIClient.java
/** * @param args the command line arguments *//*from w ww. j av a2 s. c om*/ public static void main(String[] args) { System.setProperty("com.healthmarketscience.rmiio.exporter.port", "6667"); try { Registry registry = LocateRegistry.getRegistry("192.168.0.145"); //ENDERECO Server server = (Server) registry.lookup("MyTubeRMI"); System.out.println(server.testConnection()); /* //ENVIAR ARQUIVO PRO SERVER InputStream istream = new FileInputStream("e://music.mp3"); // call server (note export() call to get actual remote interface) OutputStream ostream = RemoteOutputStreamClient.wrap(server.uploadOutputStream("arthur")); ostream.write(IOUtils.toByteArray(istream)); ostream.flush(); ostream.close(); server.saveInDatabase("arthur"); */ //RECEBER ARQUIVO DO SERVER InputStream istreamSaida = RemoteInputStreamClient.wrap(server.getFile("aaa")); int read; try (FileOutputStream out = new FileOutputStream("e:/music2.jpg")) { byte[] bytes = new byte[1024]; while ((read = istreamSaida.read(bytes)) != -1) { out.write(bytes, 0, read); } out.close(); } } catch (RemoteException | NotBoundException e) { System.out.println("Exception: " + e); } catch (IOException ex) { System.out.println("Exception: " + ex); } }
From source file:com.avanza.astrix.dashboard.AstrixDashboardServer.java
public static void main(String[] args) { System.setProperty("server.port", "9111"); System.setProperty(AstrixSettings.SERVICE_REGISTRY_URI.name(), AstrixServiceComponentNames.GS_REMOTING + ":jini://*/*/service-registry-space?groups=astrix-demo-apps"); SpringApplication.run(AstrixDashboardServer.class, args); }
From source file:de.iritgo.aktario.framework.IritgoClient.java
/** * The client main method./* w ww . jav a 2s . co m*/ * * @param args The program args. */ public static void main(String[] args) { if (null == System.getProperty("swing.aatext")) { System.setProperty("swing.aatext", "true"); } Options options = new Options(); IritgoEngine.create(IritgoEngine.START_CLIENT, options, args); }
From source file:com.usefullc.solm.common.proxy.nio.NIOSocketServer.java
public static void main(String[] args) { try {/*from w w w . j a v a 2 s .c om*/ //proxy connect pool System.setProperty("htmlDir", args[0]); int port = Integer.valueOf(args[1]); ServerMgr.init(port); //end System.out.println("htmlDir=" + args[0]); System.out.println("port=" + args[1]); ProxyTaskExecutor.start(); //? new Thread(new Runnable() { @Override public void run() { ServerMgr.startServer(); // ReadHandler.start(); //?browser req and server res ? } }).start(); System.out.println("server is start at " + ServerMgr.getPort()); } catch (Exception e) { e.printStackTrace(); } }
From source file:StringTaggerDemo.java
public static void main(String args[]) { try {//w ww . java 2s. co m System.setProperty("sen.home", "../Sen1221/senhome-ipadic"); System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "FATAL"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Please input Japanese sentence:"); StringTagger tagger = StringTagger.getInstance(); // You can also get StringTagger instance by following code: // // String confPath = System.getProperty("sen.home") // + System.getProperty("file.separator") + "conf/sen.xml"; // tagger = StringTagger.getInstance(confPath); String s; while ((s = br.readLine()) != null) { System.out.println(s); Token[] token = tagger.analyze(s); if (token != null) { for (int i = 0; i < token.length; i++) { System.out.println(token[i].toString() + "\t(" + token[i].getBasicString() + ")" + "\t" + token[i].getPos() + "(" + token[i].start() + "," + token[i].end() + "," + token[i].length() + ")\t" + token[i].getReading() + "\t" + token[i].getPronunciation()); } } } } catch (Exception e) { e.printStackTrace(); } }
From source file:test.go.java
public static void main(String... args) { System.setProperty("curator-log-events", "true"); IHyperGateServer server;/* ww w .ja v a2s.c om*/ ApplicationContext applicationContext = new ClassPathXmlApplicationContext( "META-INF/hypergate-server-context.xml"); ServerFactory.Builder builderAdvertiser = applicationContext.getBean("serverBuilder", ServerFactory.Builder.class); LOG.debug("--------------------------------------------------------"); LOG.debug("Builder properties:"); LOG.debug("Name:" + builderAdvertiser.getName()); LOG.debug("Instance Name:" + builderAdvertiser.getInstanceName()); LOG.debug("port:" + builderAdvertiser.getPort()); LOG.debug("isAutoSelectPort:" + builderAdvertiser.isAutoSelectPort()); LOG.debug("Type:" + builderAdvertiser.getType()); LOG.debug("Zookeeper connection string:" + builderAdvertiser.getZookeeperHosts()); LOG.debug("Zookeeper base path:" + builderAdvertiser.getServiceBasePath()); server = builderAdvertiser.build(); LOG.debug("\n\n"); LOG.debug("--------------------------------------------------------"); LOG.debug("After server initialization - properties"); LOG.debug("\n"); LOG.debug("Server properties:"); LOG.debug("......"); LOG.debug("Name:" + server.getName()); LOG.debug("Instance Name:" + server.getInstanceName()); LOG.debug("port:" + server.getPort()); server.start(); LOG.debug("Server started"); }
From source file:web.ui.WebApplication.java
public static void main(String[] args) throws Exception { String webPort = System.getenv("PORT"); if (webPort == null || webPort.isEmpty()) { webPort = "8080"; }// w w w . j av a2s .com System.setProperty("server.port", webPort); SpringApplication.run(WebApplication.class, args); }