![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA
okrensky888
这个作者很懒,什么都没留下…
展开
-
java多线程 银行取款
[code="java"]package net.okren.java;import java.io.*;//账户class Account{ private float balance = 1000; public float getBalance(){ return balance; } public void setBalance(float ...原创 2009-09-19 09:22:55 · 266 阅读 · 0 评论 -
Java代码修改系统时间,windows,Linux,Solaris,需要用超级管理员账号登陆系统...
[code="java"] //Operation System Name; String osName = System.getProperty("os.name"); if(osName.matches("^(?i)Windows.*$")) { Runtime.getRun...原创 2012-01-05 09:12:36 · 276 阅读 · 0 评论 -
Java 记录 日志,log,
[code="java"]public class LogUtil{ private static Logger log = Logger.getLogger(LogUtil.class.getName()); private static Handler fileHandler = null; sta...原创 2011-10-10 10:07:02 · 139 阅读 · 0 评论 -
【转】java中文解决大全
java中文解决大全(上)http://www.webasp.net/article/18/17481.htmjava中文解决大全(下)http://www.webasp.net/article/18/17482.htm参考资料 1、段明辉.Java 编程技术中汉字问题的分析及解决. http://www-900.ibm.com/devel...原创 2011-09-20 14:39:11 · 107 阅读 · 0 评论 -
public void testStatementAddBatch() public void testConnCommit()
[code="java"] public void testStatementAddBatch() { Connection conn = null; Statement stmt = null; try { conn = getDBConnectionMsSqlBySuperA...原创 2011-09-01 20:00:27 · 134 阅读 · 0 评论 -
java.net.SocketException: No buffer space available (maximum connections reached
[转载]java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind2009-04-14 09:10 公司服务器最近几天一直报错误,大概运行一天就报如下异常。 java.net.SocketException: No buffer sp...原创 2011-08-31 12:34:13 · 158 阅读 · 0 评论 -
java 数据库 Connection 事务
[code="java"] public void deleteDeadDataImprove(String tableName, long updateTime) throws Exception { // 根据报表源判断是sql if(connGrpForDel == null) { logger.e...原创 2011-08-30 14:27:48 · 195 阅读 · 0 评论 -
Java 反射 函数,多线程调用一个类中不同的方法
[code="java"]public void run() { try { Class reflectClass = Class.forName("com.zte.ums.zxnm01.common.alarmReport.AlarmDataExport"); Method m = refl...原创 2011-08-19 10:14:17 · 519 阅读 · 0 评论 -
java程序 获取所支持国家和语言
[code="java"]import java.util.Locale;public class LocaleList { public static void main(String[] args){ Locale[] localeList = Locale.getAvailableLocales(); for(int i = 0; i < local...2009-06-26 16:17:28 · 283 阅读 · 0 评论 -
使用 COS框架 实现 文件上传
需要:cos.jar,[code="java"][/code]2009-06-04 21:48:39 · 192 阅读 · 0 评论 -
使用Common-FileUpload框架实现文件上传
需要下载:commons-fileupload-1.2.1-bin.zip commons-io-1.4-bin.zip http://apache.etoak.com/commons/fileupload/binaries/http://apache.etoak.com/commons/io/binaries/[code="java"] 0 ) { ...2009-06-04 21:14:42 · 92 阅读 · 0 评论 -
java 实现 文件上传
[code="java"] 1){ br.readLine(); br.readLine(); File file = new File(request.getRealPath("/")+ System.currentTimeMillis() + ".txt"); PrintStream ps = new PrintStream(new Fil...2009-06-04 20:07:30 · 65 阅读 · 0 评论 -
求 交集
[code="java"]package net.okren.java;import java.util.*;public class Test { private static int count; public static void getInterSet(int[] a, int[] b){ Set set = new Has...2009-09-27 17:50:03 · 81 阅读 · 0 评论 -
将逗号分隔的字符串 转换成 Byte数组,
[code="java"]package net.okren.java;import java.util.*;//将逗号分隔的字符串 转换成 Byte数组,class GetByte{ public byte[] getByte(String str){ System.out.println("getByte..."); int wn = 0; for(int ...原创 2009-09-27 16:56:21 · 524 阅读 · 0 评论 -
用JAVA中的多线程示例生产者和消费者问题
[code="java"]package net.okren.java;//用JAVA中的多线程示例生产者和消费者问题class SynStack{ private String[] products = new String[10]; int index = 0; public String[] getProducts(){ return products...原创 2009-09-19 11:16:42 · 84 阅读 · 0 评论 -
java 修改文件夹的名字,和 删除文件夹目录和子目录文件
[code="java"] private boolean renameToNewFile(String src, String dest) { File srcDir = new File(src); boolean isOk = srcDir.renameTo(new File(dest)); System.out.pri...原创 2011-11-09 09:55:04 · 255 阅读 · 0 评论