草庐IT

does_not_have_foo

全部标签

java - 功能或错误 :Why does this Java code compile?

这个问题在这里已经有了答案:关闭12年前。PossibleDuplicate:IsthisvalidJava?我惊讶地发现下面的Java类可以编译。它有几个方法,具有相同的名称、参数数量和以下类型删除类型的参数。然而,它在使用各种版本的SunJDK1.6编译器的Windows上按预期编译和工作。因此,如果这是一个错误,它已经存在多年了......它还可以使用多个版本的Eclipse进行编译,但不能使用Eclipse3.6附带的编译器进行编译此外,调用代码按预期工作-即。调用代码中没有关于模棱两可的方法的错误。如果您遍历ErasureExample.class.getMethods()返

java - Ant 警告 : Implicitly compiled files were not subject to annotation processing

我在运行Ant构建脚本(Ant1.8.2、Java1.6)时收到此警告。[javac]warning:Implicitlycompiledfileswerenotsubjecttoannotationprocessing.[javac]Use-proc:nonetodisableannotationprocessingor-implicittospecifyapolicyforimplicitcompilation.[javac]1warning添加产生:[javac]error:Classnames,'implicit',areonlyacceptedifannotationproc

java - 带 TexturePaint 的图标抛出 InternalError : Surface not cachable

我有一个自定义Icon,它使用TexturePaint作为绘画并在Graphics2D对象上调用fillPolygon。此代码在JDK6和JDK7上运行良好,但在JDK8和64位Linux下失败(在64位Linux上尝试了最新的JDK1.8)。在Windows上,这在JDK8上运行良好。用于重现问题的JDK的java-version命令的输出。javaversion"1.8.0_25"Java(TM)SERuntimeEnvironment(build1.8.0_25-b17)JavaHotSpot(TM)64-BitServerVM(build25.25-b02,mixedmode)

java - 如何使用 selenium 处理 firefox 中的 "Your connection is not secure"错误

我正在使用webdriverV3.0.1和firefoxV46。我遇到了“您的连接不安全”的错误。请帮我解决这个问题。你可以在下面找到我的代码System.setProperty("webdriver.gecko.driver","D:\\Software\\Webdriver\\geckonew\\geckodriver-v0.11.1-win64\\geckodriver.exe");FirefoxProfileprofile=newFirefoxProfile();profile.setPreference("network.proxy.type",0);profile.setA

java - 注释 "not applicable to type"

多年来我一直是IntelliJ的Eclipse用户,所以我真的发现了这个错误,所有对@Override的注释都显示错误“notapplicabletotype”例如,来自JBossErrai的@PostConstruct注释到处都显示此错误,其中导入完全没有错误。我该如何解决这个问题?更新:例如@PostConstruct//Whenhoveredwiththemousepointer'@PostContruct'isnotapplicabletomethodpublicvoidinit(){}截图:http://snag.gy/q5cW5.jpg 最佳答案

java - 为什么 Weld 在 Tomcat 上显示 "Injection into Listeners is not supported"?

我有一个使用Resteasy的Web项目(它又使用Weld)并部署到Tomcat7.0.22(我把具体版本放在这里以防这个问题是这个版本特有的)。我有一个如下所示的ServletContextListener:@WebListenerpublicclassApplicationInitialisationListenerimplementsServletContextListener{//createaloggerhere@InjectHealthCheckhealthCheck;@OverridepublicvoidcontextInitialized(ServletContextE

java - Spring 数据休息 : RepositoryRestController deserialization from URI not working

我的问题是从URI字符串反序列化实体。当我使用由SpringDataRest生成的HTTP接口(interface)时,一切正常。我可以针对我的端点/api/shoppingLists发布以下JSON,它将被反序列化为以管理员为所有者的购物list。{"name":"Test","owners":["http://localhost:8080/api/sLUsers/admin"]当我使用自定义RepositoryRestController时,这不再起作用。如果我将完全相同的JSON发布到相同的端点,我会收到此响应。{"timestamp":"2015-11-15T13:18:34.

java - 'source code does not match the bytecode' 使用IDEA调试JdbcTemplate

当我使用IDEA调试JdbcTemplate源码时,IDE提示:'Sourcecodedoesnotmatchthebytecode'截图:我使用mvn来管理我的项目;我的mavenpom配置是:org.springframeworkorg.springframework.orm3.0.5.RELEASE 最佳答案 如果您有多个依赖项,而这些依赖项本身具有相同依赖项的不同版本,也会发生这种情况。JetBrains网站上的这篇文章展示了如何在首选项中启用备用源切换器。https://intellij-support.jetbrains

java - 编译错误 : JSR/RET are not supported with computeFrames option

当我编译java文件时,在IntelliJ项目上出现此错误。没有列出特定的源文件,但它失败并出现此错误。删除以下编译器标志可修复错误:-source1.5-target1.5但是,由于我们的目标是Java5,因此需要将它们包含在其中。是否有某些特定代码(可能是try/catchblock)导致了此错误?2013-10-1516:21:50,556[26947209]INFO-ompiler.BackendCompilerWrapper-JSR/RETarenotsupportedwithcomputeFramesoptionjava.lang.RuntimeException:JSR/

java - 贾斯珀报告 5.6 : Could not load the following font

我面临的问题是,JasperReports仍然找不到Arial字体。我创建了一个具有以下结构的简单Maven项目并将其包含到我的主应用程序中。所以主应用程序在类路径中包含已安装的JAR:-jasperreports_extension.properties-fonts|->arial|->ariali.ttf|->arialbi.ttf|->arialbd.ttf|->arial.ttf|->fonts.xml但我在将报告导出为PDF时仍然看到以下异常。net.sf.jasperreports.engine.JRRuntimeException:Couldnotloadthefollo