背景:在开发过程中,经常遇到各种各样的编译问题,不断的总结,才能更好的提高效率. 描述 [报错] :The method list(String, Object[]) is ambiguous for the type BaseHibernateDao<M,PK> [解决]: 原因:eclipse 的个bug,具体见http://stackoverflow.com/questions/10852923/method-is-ambiguous-for-the-type-but-the-types…
原因:eclipse 的个bug,具体见http://stackoverflow.com/questions/10852923/method-is-ambiguous-for-the-type-but-the-types-are-not-ambigues-and-the-error. 解决方法:在eclipse.ini -vmargs后面添加  -DtolerateIllegalAmbiguousVarargsInvocation=true :重启eclipse,并clean一下项目 重新编译即…
问题: 如上图, 没改钱@Override会报错The method run() of type must override a superclass method 原因: java1.5中继承接口是不需要@Override的,而在1.6中是需要添加@Override注解的 解决: 解决此问题的办法是修改java编译器的版本,方法是:elicpse的Project菜单 --> Properties --> 找到Java Compiler将Compiler Compliance level修改为…
场景:在项目开发时,一个工程引用另一个工程中的文件,出现报错“XX cannot be resolved to a type”,但是在实际通过跟踪“F3”能够找到相应的文件,最终用方法4解决. 引言: eclipse新导入的项目经常可以看到“XX cannot be resolved to a type”的报错信息.本文将做以简单总结. 正文: 1 jdk不匹配(或不存在 ) 项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildP…
今天,我弟遇到一个有意思的错误~ 程序: package com.mq.ceshi1; public class StringFormat { public static void main(String[] args) { int num = 10; int num2 = 5; System.out.println(String.format("%d / %d = %d", num,num2,num / num2)); }} 报了The method format(String, O…
[错误] 打开eclipse报错:发现了以元素 ‘d:skin’ 开头的无效内容.此处不应含有子元素. [具体报错信息] Error parsing D:\Android-sdks\system-images\android-22\android-wear\armeabi-v7a\devices.xml cvc-complex-type.2.4.d: 发现了以元素 ‘d:skin’ 开头的无效内容.此处不应含有子元素. Error: Error parsing D:\android-sdks\s…
在ubuntu中启动eclipse报错:(Eclipse:15978): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed. 出现错误原因:出现这个错误是因为环境变量配置出现了错误,虽然在安装JDK的时候在/etc/profile中配置了环境变量,但是并没有配置~/.profile. 首先先说明一下/etc/profile ~/…
参考资料:http://blog.csdn.net/happyteafriends/article/details/8290950 一.问题 在Ubuntu下安装了java并在~/.bashrc配置了环境变量,在终端可运行java等命令,但启动eclipse报错说缺少jre或jdk: ”a java runtime environment jre or java development kit jdk....“ 二.解决 在在/etc/environment里补充上jdk bin的路径即可. 三…
Eclipse报错 due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar 解决方案 Eclipse 编译时报错: Access restriction:The type NEW is not accessible due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar 解决方法如下:  1.进入Project -…
Maven项目下update maven后Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderL     严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.co…