Java 执行jar linux 实例
需求:通过执行jar的方式 ,把某个文件路径下的用户数据同步到redis
1、main 函数
public class Main { private static Logger logger = LoggerFactory.getLogger(Main.class); private static DisruptorService disruptorService = new DisruptorService(); private static AppsTaskService appsTaskService =new AppsTaskService(); /**
* 调用具体的方法
* @param args
*/
public static void main (String[] args) {
try {
if(args[0].trim().equals("appsTask")){ appsTaskService.appsTask(args[1],args[2]);
}else{
Method targetMethod = DisruptorService.class.getDeclaredMethod(args[0].trim(), args.getClass());
targetMethod.invoke(disruptorService, (Object)args);
}
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
}
} }
2 service
package cn.ycmedia.dmp.redisData.service; import cn.ycmedia.dmp.redisData.common.Consts;
import cn.ycmedia.dmp.redisData.dao.IndexPartionRedisDao;
import cn.ycmedia.dmp.redisData.utils.FileUtil;
import cn.ycmedia.dmp.redisData.utils.StringUtil;
import org.apache.commons.lang3.StringUtils;
import redis.clients.jedis.Jedis; import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException; /**
* Created by ${朱良兴} on 2016/7/20.
*/
public class AppsTaskService { private IndexPartionRedisDao redisDao = new IndexPartionRedisDao();
/**
*
* @param arg app分类+app父类ID
* @param arg1 文件所在路径
*/
public void appsTask(String arg, String arg1) {
File root = new File(arg1);
try {
showAllFiles(arg,root);
}catch (Exception e){ } } public void showAllFiles(String arg ,File dir) throws Exception{
File[] fs = dir.listFiles();
BufferedReader reader;
for(int i=0; i<fs.length; i++){
reader = new BufferedReader(new FileReader(fs[i].getAbsolutePath()));
String line;
while ((line = reader.readLine()) != null&&!" ".equals((line = reader.readLine()))) {
saveRecord(arg,line);
}
if(fs[i].isDirectory()){
try{
showAllFiles(arg,fs[i]);
}catch(Exception e){}
}
}
} public void saveRecord (String projectId, String line)
throws IOException, InvocationTargetException, IllegalAccessException{
try {
Jedis jedis = null;
try {
String uid = line.trim();
String key = Consts.Disruptor.keyPrefix + uid;
jedis = redisDao.getJedis(uid);
String exist = jedis.hget(key, "apps"); System.out.println("之前的:"+exist);
String value;
if (StringUtils.isBlank(exist)) {
value = projectId;
jedis.hset(key, "apps", value);
}
else {
String newValue= StringUtil.adverticalPro(exist,projectId);
jedis.hset(key, "apps", newValue);
}
System.out.println("之后的:"+jedis.hget(key, "apps"));
jedis.expire(key, Consts.Redis.REDIS_EXPIRE_MONTH);
}catch (Exception e) {
e.printStackTrace();
} finally {
if (jedis != null) {
jedis.close();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
======================打包成jar
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnYAAAEQCAIAAACyc650AAAfgUlEQVR4nO3d248b12HH8XnQg/+KAPkD8iSED+xbEwRxUaMwCj80dhLWidmobRIkvdgGgkB2WjEO4oBNnDhKq3jjJEbrXUlWZFHrjayLJVv27oq2LFmyREtaSWvr4pXEva/2IvZhyJlzmxvJsxzOfj9YCCtezpwzc2Z+c87Mkk4dAABY4PS6AgAAZBMRCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWELEAAFhBxAIAYAURCwCAFUQsAABWOA0AAGABo1gAAKwgYgEAsMIZsKzRaIjL0x9ZZ1Yr0PPWrY/0N9PY8QBgnTlbbLp69SoRmz3pb6Zew4GBAatdHQB0CW53uprQFiI2o9LfzKCI7dYtDAAQR7KIjf9i94hGxGZS2810nHW69k/EAkiDxBEb/xjXdxE7Pj5eLDreT3cL123d6niRs9VxtjrOuiVQh3q+ESMRsQ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B7KQsQyUQwASKEsRCwTxQCAFMpIxDJRDABImyxELBPFAIAUykLEMlEMAEihjETs00899cru3Qdbjh8/fvLkSSIWANBDWYhYJooBACmUhYjlAxQBAClExBKxAAAriFgiFgBgBRFLxAIArCBiiVgAgBVELBELALCCiCViAQBW/D++yROv8sZ8VgAAAABJRU5ErkJggg==" alt="" />
=============================
执行: java -jar proBanDirect-jar-with-dependencies.jar appsTask 5,6\|8,9 /opt2/dmp/redisApps/file
Java 执行jar linux 实例的更多相关文章
- java 执行 jar 包中的 main 方法
java 执行 jar 包中的 main 方法 通过 OneJar 或 Maven 打包后 jar 文件,用命令: java -jar ****.jar执行后总是运行指定的主方法,如果 jar 中有多 ...
- java执行jar包出错:Unable to access jarfile
java执行jar包出错:Unable to access jarfile 错误的原因有多种: 1.一般都是路径不正确.在Windows中,正确的路径类似于: java -jar "D:\W ...
- Java 执行jar文件出现版本错误信息
Java 执行jar文件出现版本错误信息 一.问题 执行jar文件出现如下错误信息: 二.解决方案 是因为在创建工程的时候选择的jdk编译版本,和执行jar环境的jdk版本不一致: 更改工程的jdk版 ...
- java 执行jar包里面一个类class文件
一.环境: 1. linux 2. 有两个java类,A.java和B.java,都在同一个目录下 二.源码: A.java package com.abc; public class A { ...
- Java执行jar总结
1.命令集 1)nohup 用途:不挂断地运行命令. 语法:nohup Command [ Arg … ] [ & ] 无论是否将 nohup 命令的输出重定向到终端,输出都将附加到当前目录的 ...
- java 执行jar指定log4j.properties文件位置
默认情况下,log4j.properties会被加载,并且这个文件需要在classpath根目录,当打包jar时,会打包打jar内部,当需要修改日志级别时,会比较麻烦 可以使用:java -jar - ...
- java执行jar包
一般运行包含manifest的jar包,可以使用 java -jar <jar-file-name>.jar 如果jar里没有 manifest,则可以使用 java -cp foo.ja ...
- Java:Linux上java -jar xxx.jar命令执行jar包时出现Error: Invalid or corrupt jarfile xxx.jar解决方案
背景: 从ftp上上传jar包到linux上,之后在linux上通过ftp命令下载jar包文件,开始执行Java-jar,一直提示错误:Error: Invalid or corrupt jarfil ...
- Java 执行linux命令(转)
转自 http://blog.csdn.net/a19881029/article/details/8063758 java程序中要执行linux命令主要依赖2个类:Process和Runtime 首 ...
随机推荐
- Android Studio中JNI -- 2 -- 编写c文件
继上一篇,我们在native接口中编写了2个方法 生成的相应.h文件 这时,需要我们自己去完善.c文件 /* DO NOT EDIT THIS FILE - it is machine generat ...
- LVS高可用集群
高可用LVS 集群构建 在LVS集群当中Director的作用是很关键的,所以我们在生产环境中要保证其高可用. 高可用架构图: 1.通过 piranha搭建LVS高可用性集群 piranha是REDH ...
- Linux系统性能分析工具
1. uptime 2. htop 3. mpstat 4 . iostat 5. dstat 6. netstat 7. tcpdump 8. sar
- div模块变灰
整站变灰目前没发现什么特别好的办法,但是div(或者其他标签模块)模块变灰方法兼容性还不错. .gay_box{ filter: grayscale(100%); -webkit-filter: gr ...
- Python之简单的SMTP发送邮件详细教程附代码
简介 Python发送邮件的教程本人在网站搜索的时候搜索出来了一大堆,但是都是说了一大堆原理然后就推出了实现代码,我测试用给出的代码进行发送邮件时都不成功,后面找了很久才找到原因,这都是没有一个详 ...
- Windows下配置g++的简单方法
需要下载名为 Cygnus的软件.下载地址: http://www.claremontmckenna.edu/math/ALee/g++/full.exe 安装完成后配好环境变量就可以用gcc, g+ ...
- WorkerScript QML Type
官方描述:在一个Qt Quick应用程序中可以使用线程了. Import Statement: import QtQuick .属性:source : url信号:message(jsobje ...
- WPF 自定义路由事件
如何:创建自定义路由事件 首先自定义事件支持事件路由,需要使用 RegisterRoutedEvent 方法注册 RoutedEvent C#语法 public static RoutedEvent ...
- Uva_11361 Investigating Div-Sum Property
题目链接 题意: 在[A,B]区间内找出满足条件的数有多少个. 条件:这个数本身 能够整除K, 且各位数字之和能够整除K. 思路: 数据范围过大2^31 2^31 = 2147483648 ~ 2*1 ...
- hadoop 学习笔记 (十) mapreduce2.0
MapReduce的特色---不擅长的方面 >实时计算 像mysql一样,在毫秒级或者秒级内返回结果 >流式计算 Mapreduce的输入数据时静态的,不能动态变化 MapReduce自身 ...