资源简介
dubbo服务注册中心,dubbo消费者的订阅中心,开发dubbo项目的必备工具
代码片段和文件信息
/**
* 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.
*/
package org.apache.zookeeper.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
/**
* This is a generic Main class that is completely driven by the
* /mainClasses resource on the class path. This resource has the
* format:
*
* cmd:mainClass:Description
*
* Any lines starting with # will be skipped
*
*/
public class FatJarMain {
static class Cmd {
Cmd(String cmd String clazz String desc) {
this.cmd = cmd;
this.clazz = clazz;
this.desc = desc;
}
String cmd;
String clazz;
String desc;
}
static HashMap cmds = new HashMap();
static ArrayList order = new ArrayList();
/**
* @param args the first parameter of args will be used as an
* index into the /mainClasses resource. The rest will be passed
* to the mainClass to run.
* @throws IOException
* @throws ClassNotFoundException
* @throws NoSuchMethodException
* @throws SecurityException
* @throws IllegalAccessException
* @throws IllegalArgumentException
*/
public static void main(String[] args) throws IOException ClassNotFoundException SecurityException NoSuchMethodException IllegalArgumentException IllegalAccessException {
InputStream is = FatJarMain.class.getResourceAsStream(“/mainClasses“);
if (is == null) {
System.err.println(“Couldn‘t find /mainClasses in classpath.“);
System.exit(3);
}
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line;
while((line = br.readLine()) != null) {
String parts[] = line.split(“:“ 3);
if (parts.length != 3 || (parts[0].length() > 0 && parts[0].charAt(0) == ‘#‘)) {
continue;
}
if (parts[0].length() > 0) {
cmds.put(parts[0] new Cmd(parts[0] parts[1] parts[2]));
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-10-29 16:16 zookeeper-3.4.6\
目录 0 2015-10-29 16:14 zookeeper-3.4.6\bin\
文件 238 2014-02-20 18:14 zookeeper-3.4.6\bin\README.txt
文件 1937 2014-02-20 18:14 zookeeper-3.4.6\bin\zkCleanup.sh
文件 1049 2014-02-20 18:14 zookeeper-3.4.6\bin\zkCli.cmd
文件 1534 2014-02-20 18:14 zookeeper-3.4.6\bin\zkCli.sh
文件 1333 2014-02-20 18:14 zookeeper-3.4.6\bin\zkEnv.cmd
文件 2696 2014-02-20 18:14 zookeeper-3.4.6\bin\zkEnv.sh
文件 1084 2014-02-20 18:14 zookeeper-3.4.6\bin\zkServer.cmd
文件 5742 2014-02-20 18:14 zookeeper-3.4.6\bin\zkServer.sh
文件 82446 2014-02-20 18:14 zookeeper-3.4.6\build.xm
文件 80776 2014-02-20 18:14 zookeeper-3.4.6\CHANGES.txt
目录 0 2015-10-29 16:14 zookeeper-3.4.6\conf\
文件 535 2014-02-20 18:14 zookeeper-3.4.6\conf\configuration.xsl
文件 2161 2014-02-20 18:14 zookeeper-3.4.6\conf\log4j.properties
文件 924 2015-07-21 16:45 zookeeper-3.4.6\conf\zoo.cfg
文件 922 2014-02-20 18:14 zookeeper-3.4.6\conf\zoo_sample.cfg
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\
文件 2984 2014-02-20 18:14 zookeeper-3.4.6\contrib\fatjar\build.xm
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\conf\
文件 707 2014-02-20 18:14 zookeeper-3.4.6\contrib\fatjar\conf\mainClasses
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\src\
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\src\java\
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\src\java\org\
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\src\java\org\apache\
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\src\java\org\apache\zookeeper\
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\fatjar\src\java\org\apache\zookeeper\util\
文件 4472 2014-02-20 18:14 zookeeper-3.4.6\contrib\fatjar\src\java\org\apache\zookeeper\util\FatJarMain.java
文件 7664699 2014-02-20 18:14 zookeeper-3.4.6\contrib\fatjar\zookeeper-3.4.6-fatjar.jar
目录 0 2015-10-29 16:14 zookeeper-3.4.6\contrib\loggraph\
............此处省略1843个文件信息
- 上一篇:Radmin3.4官方中文版+注册机亲试可注册
- 下一篇:监控系统APM对比
相关资源
- dubbo-admin-2.5.4.war
- zookeeper-3.4.6
- zookeeper-3.4.5.tar.gz178819
- 电商微服务项目
- zookeeper 分布式实践
- 从Paxos到Zookeeper分布式一致性原理与实
- dubbo-admin-2.8.4.war
- zookeeper-3.4.5.tar.gz
- dubbo-admin-2.5.9.war 已编译
- dubbo教程demo代码
- dubbo-monitor-simple-2.5.3-assembly.tar.gz
- dubbo-monitor-simple-2.5.3-assembly
- dubbo监控中心
- dubbo-admin-2.5.7
- dubbo-admin-2.5.5
- zookeeper-3.4.10 64位 Windows服务版
- 网上商城系统源码
- Dubbo入门Demo155110
- dubbo-admin-2.8.4
- dubbo spring4.1集成demo
- zookeeper-3.4.8解压即用低分版
- dubbo-admin-2.5.10
- 从Paxos到Zookeeper++分布式一致性原理与
- dubbo-monitor-simple-2.8.4-assembly.tar.gz
- dubbo zookeeper demo
- zookeeper插件
- dubbo-admin-2.5.4-SNAPSHOT.war
- eclipse 中实现dubbo provider、customer源代
- jdk-8u171-linux-i586.tar.gz和zookeeper-3.4.6.
- zookeeper+Dubbo环境搭建所需工具
评论
共有 条评论