摘要: %workspace%/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs在里面加上SHOW_MEMORY_MONITOR=true重启eclipse,就可以在... 阅读全文
posted @ 2018-12-09 11:01 xuejianbest 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 首先安装字体(windows下双击安装):https://github.com/cypro666/yahei.consolas-font/blob/master/YaHei.Consolas.1.12.ttf?raw=true设置字体:Window --> ... 阅读全文
posted @ 2018-12-08 20:13 xuejianbest 阅读(204) 评论(0) 推荐(0) 编辑
摘要: JobDetail job1 = newJob(MyJob.class).withIdentity("job1", "group1").build();newJob方法其实返回一个JobBuilder实例,通过调用JobBuilder的方法配置任务属性,最后... 阅读全文
posted @ 2018-12-08 20:13 xuejianbest 阅读(1290) 评论(0) 推荐(0) 编辑
摘要: quartz是一个作业调度系统用来执行定时任务的。初始化:将quartz-all-2.1.6.jar或者quartz-2.1.6.jar添加到classpath路径下。(实际上Quartz还是用SLF4J作为日志工具,因此还需要将slf4j-api-2.1.... 阅读全文
posted @ 2018-12-08 20:13 xuejianbest 阅读(575) 评论(0) 推荐(0) 编辑
摘要: public class Main { public static double sum = 0.0; public static void main(String[] args) throws ClassNotFoundException, I... 阅读全文
posted @ 2018-12-08 20:13 xuejianbest 阅读(1194) 评论(0) 推荐(0) 编辑
摘要: import java.util.concurrent.CountDownLatch;CountDownLatch c = new CountDownLatch(5); //初始化一个计数值为5的进程c.await(); //进入等待状态,直到计数... 阅读全文
posted @ 2018-12-08 20:13 xuejianbest 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 创建多线程:java中创建多线程需要先实现Runnable接口,线程所做的工作写到run方法里。public class myThread implements Runnable { @Override public void run() { ... 阅读全文
posted @ 2018-12-08 20:13 xuejianbest 阅读(133) 评论(0) 推荐(0) 编辑
摘要: //文件读写:BufferedReader reader = new BufferedReader(new FileReader(new File("file.in")));BufferedWriter writer = new BufferedWriter... 阅读全文
posted @ 2018-12-08 20:12 xuejianbest 阅读(285) 评论(0) 推荐(0) 编辑
摘要: TreeSet是一个能够有序存储的容器,里面的元素都按照从小到大排列。里面元素的能比较大小,是由于这些元素实现了Comparable接口,实现这一接口要求实现int compareTo(T t)方法。假设A实现了Comparable, a和b为A的对象,则:... 阅读全文
posted @ 2018-12-08 20:12 xuejianbest 阅读(998) 评论(0) 推荐(0) 编辑
摘要: 如果发生 java.lang.OutOfMemoryError ,则建议使用JVM option -Xms1g、 -Xmx1g、 -Xmn512m。 阅读全文
posted @ 2018-12-08 20:12 xuejianbest 阅读(157) 评论(0) 推荐(0) 编辑