随笔分类 -  Java

上一页 1 2

[Training Video - 6] [File Reading] [Java] Read Properties file
摘要:package com.file.properties;import java.io.FileInputStream;import java.util.Properties;public class ReadProperties { Properties prop; public ReadPro... 阅读全文

posted @ 2015-06-16 15:52 张缤分 阅读(336) 评论(0) 推荐(0) 编辑

[Training Video - 6] [File Reading] Making a Jar file with eclispe, Importing custom jars in SoapUI
摘要:Code example :package com.file.properties;import java.io.FileInputStream;import java.util.Properties;public class ReadProperties { Properties prop; ... 阅读全文

posted @ 2015-06-16 14:16 张缤分 阅读(174) 评论(0) 推荐(0) 编辑

[Java]通过java获取计算机名
摘要:通过java获取计算机名String hostname = "Unknown"; try { InetAddress addr; addr = InetAddress.getLocalHost(); hostname = addr.getHostName(); }... 阅读全文

posted @ 2015-06-08 17:34 张缤分 阅读(2182) 评论(0) 推荐(0) 编辑

java.text.SimpleDateFormat的使用
摘要:SimpleDateFormat 是一个以国别敏感的方式格式化和分析数据的具体类。 它允许格式化 (date -> text)、语法分析 (text -> date)和标准化。SimpleDateFormat 允许以为日期-时间格式化选择任何用户指定的方式启动。 但是,希望用 DateFormat 中的 getTimeInstance、 getDateInstance 或 getDateTimeInstance 创建一个日期-时间格式化程序。每个类方法返回一个以缺省格式化方式初始化的日期/时间格式化程序。可以根据需要用 applyPattern 方法修改格式化方式。 关于使用这些方 阅读全文

posted @ 2013-11-21 11:14 张缤分 阅读(848) 评论(0) 推荐(0) 编辑

在Jmeter中用JAVA获取Rolling Date
摘要:Rolling Date_Weeklyimport java.util.*;import java.text.SimpleDateFormat;import java.text.DateFormat;int oldY=2010;int oldM=10;int oldD=7;vars.put("oldDateWeekly",oldM+"/"+oldD+"/"+oldY);Calendar oldCal=Calendar.getInstance();oldCal.set(oldY,oldM-1,oldD);int oldDayOfWeek 阅读全文

posted @ 2013-11-19 14:52 张缤分 阅读(513) 评论(0) 推荐(0) 编辑

JDK和Eclipse的下载路径
摘要:JDKhttp://www.oracle.com/technetwork/java/javase/downloads/index.htmlEclipsehttp://www.eclipse.org/downloads/ 阅读全文

posted @ 2013-11-13 15:11 张缤分 阅读(141) 评论(0) 推荐(0) 编辑

Java中通过SimpleDateFormat格式化当前时间:/** 输出格式:20060101010101001**/
摘要:import java.util.*;import java.text.SimpleDateFormat;int y,m,d,h,mi,s,ms;String cur;Calendar cal=Calendar.getInstance();y=cal.get(Calendar.YEAR);m=cal.get(Calendar.MONTH)+1;d=cal.get(Calendar.DATE);h=cal.get(Calendar.HOUR_OF_DAY);mi=cal.get(Calendar.MINUTE);s=cal.get(Calendar.SECOND);ms=cal.get(Cale 阅读全文

posted @ 2013-10-30 14:29 张缤分 阅读(404) 评论(0) 推荐(0) 编辑

在jmeter的beanshell中用java获取系统当前时间
摘要:import java.util.*;int y,m,d,h,mi,s; Calendar cal=Calendar.getInstance(); y=cal.get(Calendar.YEAR); m=cal.get(Calendar.MONTH); d=cal.get(Calendar.DATE); h=cal.get(Calendar.HOUR_OF_DAY); mi=cal.get(Calendar.MINUTE); s=cal.get(Calendar.SECOND); System.out.println("The current time... 阅读全文

posted @ 2013-09-16 15:18 张缤分 阅读(1656) 评论(1) 推荐(0) 编辑

JAVA Get UUID
摘要:UUID是通用唯一标识码(Universally Unique Identifier),通过开源软件基金会(OSF)设立的一种算法生成。它的主要作用就是保证生成的字符串在同一时空中所有机器上都是唯一的。Get(UUID)是FileMaker Pro 12的新函数,它的主要作用就是生成UUID。UUID由以下几部分的组合:1. 当前日期和时间,UUID的第一个部分与时间有关,如果你在生成一个UUID之后,过几秒又生成一个UUID,则第一个部分不同,其余相同。2. 时钟序列。3. 全局唯一的IEEE机器识别号,如果有网卡,从网卡MAC地址获得,没有网卡以其他方式获得。UUID的格式为:xxxxxx 阅读全文

posted @ 2013-09-10 17:49 张缤分 阅读(1677) 评论(0) 推荐(0) 编辑

上一页 1 2

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示