Eclipse环境下a class file was not written问题的解决办法
来源:互联网 发布:手机赚钱软件哪个好 编辑:程序博客网 时间:2024/05/22 14:09
今天在学java泛型的课程,敲了以下代码后发现编译出错,提示A class file was not written. The project may be inconsistent, if so try refreshing this project and building it.
package com.generic;class Con<T>{private T value;public Con(T v){this.value = v;}public T getValue() {return value;}public void setValue(T value) {this.value = value;}}public class Test2 {public static void main(String[] args) {// TODO Auto-generated method stubCon<String> c = new Con<String>("this is a string");System.out.println(c.getValue());}}
查找了一些资料,说是workspace所在磁盘空间不足引起的,我看了下磁盘空间足够大,所以排除,后来发现CSDN上一位zhtao0416兄弟发现了一个解决方案,试了下果然可以,以下内容来自http://blog.csdn.net/zhtao0416/article/details/4256217 侵删。
下面是其他的一些保留字,在Windows下面都不能创建。注重,不许分大小写。Con,con,CON 都不可以!
con是操作系统保留的一个设备名字,还有很多设备名都不能拿来用,如下:
The following reserved device names cannot be used as the name of a file: CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed by an extension (for example, NUL.tx7).
把代码中所有的Con换成Cons以后问题迎刃而解。
- Eclipse环境下a class file was not written问题的解决办法
- A class file was not written. Eclipse+Java
- [Eclipse问题]A class file was not written. The project may be inconsistent
- A class file was not written.
- A class file was not written.
- A class file was not written解决方法
- A class file not written.
- ERROR:A class was not written.
- 解决linux下Eclipse环境中A program file was not specified in the launch configuration.的问题
- A class file was not written. The project may be inconsistent
- 菜鸟解决方法 A class file was not written. The project may be inconsisten
- 编译错误:A class file was not written. The project may be inconsistent, if so try refreshing this projec
- A class file was not written. The project may be inconsistent, if so try refreshing this project and
- eclipse c++ 问题Launch failed,Binary not found和A program file was not specified in the launch configur
- 解决The project was not built since its build path is incomplete. Cannot find the class file的问题
- Eclipse中的Class File Editor source not found问题
- 【rabbitmq】Warning: PID file not written; -detached was passed. ERROR: node with name "rabbit" alread
- ./configure 出现package was not found问题的解决办法
- std::deque
- 轻松用python实现排列组合功能
- $.ajax()
- Oracle定时调用存储过程
- DataGridView调整列宽
- Eclipse环境下a class file was not written问题的解决办法
- 使用json实现查询条件传回Action进行hql语句拼接查询实现在结果中查询功能在datagrid中显示查询结果
- shpinx-coreseek 安装和使用
- 99%的房地产企业都会遇到的信息化问题
- 某HPC集群开关机维护操作
- Centos6.5 安装 samba
- phpwind/Discuz/WordPress对比
- mysql---sql文件导入和导出
- view变化监听器ViewTreeObserver介绍