随笔分类 -  Java

摘要:1.需要引入的jar包:pinyin4j-2.5.0.jar2.code如下:import net.sourceforge.pinyin4j.PinyinHelper;import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;import net.sourceforge.pinyin4j.for 阅读全文

posted @ 2013-01-21 16:43 关心 阅读(298) 评论(0) 推荐(0) |

摘要:java实现webservice实例2012-07-17 16:08:031.首先创建个WEB工程,然后:http://ws.Apache.org/axis/网站下载Axis安装包.当然还依赖其他包的。2.创建类以及需要对外提供的方法package com.cn.test;public class ServiceMehtod {public String getInfo(String str1,String str2,String str3){return "ServiceMehtod:getInfo() =====>str1="+str1+";str2=& 阅读全文

posted @ 2012-09-25 21:36 关心 阅读(219) 评论(0) 推荐(0) |

摘要:原因追踪及解决办法:1.查阅资料发现说在jdk1.5下要使用@Override这个annotation必须保证被标注的方法来源于class而不是interface.2.即使自己的jdk是1.6,还需要修改myeclipse里面的编译jdk版本,从1.5(5.0)改成1.6(6.0),否则还会出现上述错误。解放办法:在myeclipse下:Windows-Preferences-Java Compiler,在右边的Compiler Compliance Level 修改成1.6(6.0)版本。3.此时如果发现还是上述错误,原因是项目还没有吧jre变成1.6(6.0)。解决办法:项目右键-> 阅读全文

posted @ 2012-09-25 21:28 关心 阅读(140) 评论(0) 推荐(0) |

摘要:1、在开发环境中加载指定数据库的驱动程序。例如:mysql-connector-java-5.1.18-bin.jar2、在Java程序中加载驱动程序。例如:Class.forName("com.mysql.jdbc.Driver")。3、创建数据连接对象。通过DriverManager类创建数据库连接对象Connection.connection=DriverManager.getConnection("连接数据库的URL","用户名","密码")。例如:Connection con=DriverManager. 阅读全文

posted @ 2012-09-25 21:26 关心 阅读(479) 评论(0) 推荐(0) |

摘要:1.建立临时model类(由User类和Student类组成):public class UserTmp{private Integer userId;private String userName;private Integer userSex;private String userAddress;private String stuId;private String stuName;public void setUserId(Integer userId){this.userId=userId;}public Integer getUserId(){return userId;}//剩下的 阅读全文

posted @ 2012-09-25 21:24 关心 阅读(321) 评论(0) 推荐(0) |

摘要:1.在model包里创建StrObject.xsd文件:<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"targetNamespace="http://www.w3school.com.cn" xmlns="http://www.w3school.com.cn"elementFormDefault="qualified"&g 阅读全文

posted @ 2012-09-25 21:23 关心 阅读(793) 评论(0) 推荐(0) |

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3