public class Test { public static void main(String[] args) throws IOException, InterruptedException { String command = "cmd /k D:\\ProgramFiles\\workspace_eclipse\\Java_Maintenanec_System\\src\\com...
分类:
编程语言 时间:
2014-07-22 08:28:35
阅读次数:
214
public static void importExcel2(File file) throws Exception, IOException { Workbook book = Workbook.getWorkbook(file); // 获得第一个工作表对象 ...
分类:
其他好文 时间:
2014-07-19 14:10:37
阅读次数:
226
发送文件需要提供准确的接收放用户名称(例:user2@192.168.1.100)、本地文件全路径(例:E:\\xxx\\xxx.zip)
接收文件必须声明一个文件监听器用于监听有可能发送过来的文件。
客户端发送文件代码片断
public void sendFire(XMPPConnection conn,String toUser,String filePath)throws XMPPEx...
分类:
其他好文 时间:
2014-07-19 14:03:57
阅读次数:
242
public class Test {
private static final SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:dd");
public static void main(String[] args) throws SQLException {
oracle.sql.TIMESTAMP t...
分类:
数据库 时间:
2014-07-19 08:00:40
阅读次数:
209
写入:private void insertFile(HttpServletRequest request, HttpServletResponse response) throws IOException { String path_member = reque...
分类:
数据库 时间:
2014-07-18 17:34:09
阅读次数:
316
显然错误的原因是没有重写servlet的doGet方法,只是覆盖了doPost的方法。解决的方法很简单:1 public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IO....
分类:
Web程序 时间:
2014-07-18 14:16:22
阅读次数:
266
1、Servletpublic void excute(HttpServletRequest request, HttpServletResponse response) throws Exception { request.setCharacterEncoding("utf-8"); St...
分类:
Web程序 时间:
2014-07-18 10:27:34
阅读次数:
267
1 import java.text.*; 2 import java.util.*; 3 public class DateDemo { 4 public static void main(String[] args) throws Exception{ //throws Exception {....
分类:
编程语言 时间:
2014-07-18 10:01:46
阅读次数:
230
/** * 上传文件 * @param file * @param path * @param fileName * @throws IOException */public void fileLoad(File file, String path, String fileName)throws I...
分类:
其他好文 时间:
2014-07-18 00:18:04
阅读次数:
274
1、建立java类public class StudentManage {int pageSize = 3;//每页记录数 //获取记录总数 private int getTotalNum(String strWhere) throws SQLException { DbAccess dbAcce....
分类:
Web程序 时间:
2014-07-17 18:29:44
阅读次数:
207