ITeye博客

Java

共 5 篇文章

IntelliJ idea的maven工程老是提示:Cannot Resolve xx.class

IntelliJ idea的maven工程老是提示:Cannot Resolve xx.class,如图 编译时异常: 项目是多模块项目,我已经在项目的pom.xml文件中添加了相应的依赖,如图: 在libraries中已经有了相应的包, 此时需要进入设置 选择dependencies 添加相应的module

2017-06-26 15:00 · Java · maven · idea

java简单实现压缩和解压功能

import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Expand; import org.apache.tools.ant.taskdefs.Zip; import org.apache.tools.ant.types.FileSet; import java.io.File; public class ZipUtil { private final Projec…

2017-06-21 17:30 · Java

Could not load com.mchange.v2.c3p0.impl.PoolBackedDataSourceBaseBeanInfo.

INFO: Illegal access: this web application instance has been stopped already. Could not load com.mchange.v2.c3p0.impl.PoolBackedDataSourceBaseBeanInfo. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused t…

2016-06-15 16:22 · Java

java在windows和linux环境下文件路径问题

在Java开发中涉及到一些文件路径问题,可能在Windows环境下不会出现任何问题。如果项目部署在linux环境下,可能会出现问题。 例如: Windows :“\” Linux : “/” 为了保证文件路径与平台无关,可以使用File.separator方法来代替斜杠。

2015-08-03 10:22 · Java

Java中路径问题

<div class="iteye-blog-content-contain" style="font-size: 14px"></div> Java路径中的空格问题 1、 URLTest.class.getResource("/").getPath(); URLTest.class.getResource("/").getFile(); URLTest.class.getClassLoader().getResource("").getPath(); Thread.currentThread().getContextClassLoader().getResource("").getPath…

2014-09-17 09:48 · Java