前言
No mater what project I am doing,trouble will always be my friend, staring at me and not willing to go away. But time is gonna cure all the pain, as long as you hold on to it.
问题集锦
1.tomcat配置问题
问题:
2017-5-3 15:31:25 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Users\Summer\AppData\Local\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin;C:\Users\Summer\AppData\Local\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201211011550\tomcat\bin
2017-5-3 15:31:25 org.apache.coyote.http11.Http11Protocol init
严重: Error initializing endpoint
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
解决方法:下载符合自己版本的tcnative-1.dll,放到tomcat的bin下。eclipse会提醒你需要什么版本。
1.
2.
3.
4.
5.
2.tomcat警告
问题:
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:shop' did not find a matching property.
解决方案:
选中图中打对勾的地方。
3.项目非正常关闭,无法打开,需要修改workspace
解决方案:
1、进入 Window > Preferences > General > Startup and Shutdown 选中 Prompt for workspace on startup。
2、进入Eclipse的安装目录,找到configuration 目录下的 .settings 文件夹,里面有一个 org.eclipse.ui.ide.prefs, 用Ultra Edit等打开,也可以用写字板打开,找到RECENT_WORKSPACES,按照它的格式修改一下。
3、先打开Eclipse,进入之后,再去打开一次,会提示 Workspace in use or cannot be created, choose a different one 。 这时候就会提示你更改workspace的目录了。
这三种方法都可以更改,选一种适合的就可以。
4.eclipse的Date类型转换成DateTime类型
问题:
解决方案:
SimpleDateFormat temp= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
try {
Date date=temp.parse(temp.format(new Date()));
order.setOrdertime(date);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
小结
That is all that I have experienced these days. When I faced all the problems,which keep promp out now and then, I felt totally lost. Luckly, I defeated all the clingy friends, if they can be called so.