草庐IT

process-build

全部标签

java.nio.文件.FileSystemException : The process cannot access the file because it is being used by another process

我正在编写一个程序,在第一次执行时将自己复制到特定文件夹,在linux或windows中工作。在linux中它工作得很好但是当我尝试在windows上做同样的事情时我得到以下错误:java.nio.file.FileSystemException:Theprocesscannotaccessthefilebecauseitisbeingusedbyanotherprocess(insun.nio.fs.WindowsException)那么,另一个进程是程序本身,我应该用什么来跳过这个错误呢?我的代码行是:publicvoidinstallProgram(){System.out.pr

java - 安卓工作室 : Check for a custom build type

我试图让一段代码检测BuildType,但我有点卡住了。每当我为IF语句键入代码时,它都会显示Incompatibletypes.Required:Boolean.Found:java.lang.String当我想到如果最后有.toString()就一定是一个字符串。我检测它的代码是:Stringbuildtype=BuildConfig.BUILD_TYPE.toString();if(buildtype="admin"){//Dosomeadminstuffhere.}我在我的build.gradle文件中设置了adminBuildType,如下所示:admin{debuggabl

java - build-helper-maven-plugin 添加测试资源错误

我有这个项目结构:/src/main/java/resources/test/java/resources/it/java/resourcestest用于单元测试和it用于集成测试。我正在使用build-helper-maven-plugin将额外的测试源/资源添加到类路径以供以后使用maven-surfire-plugin运行unittests和maven-failsafe-plugin对于integrationtests.插件配置如下:org.codehaus.mojobuild-helper-maven-plugin1.9.1add-integration-test-source

java - Spring 启动 + Gradle : how to build executable jar

我正在尝试在SpringBoot+Gradle项目中构建一个可执行jar,但目前没有任何效果。这是最简单的结构。Gradle配置中可能缺少某些内容。Gradle:buildscript{ext{springBootVersion='1.5.8.RELEASE'}repositories{mavenCentral()}dependencies{classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")}}applyplugin:'java'applyplugin:'org.spr

java - Gradle深度讲解中的build-by-convention是什么?

GradleUserGuide经常提到Gradle是声明式并使用按约定构建。这是什么意思?根据我的理解,这意味着,例如,在java插件中有这样的约定源必须在src/main/java,测试必须在src/main/test,资源在src/main/resources,就绪build/libs中的jars等等。但是,Gradle不强制您使用这些约定,您可以根据需要更改它们。但是对于第一个概念,我在理解上有更大的问题。就像SQL一样,你说你想对你的查询做什么,但不说数据库系统将如何获得它们,使用哪种算法来提取数据等。请告诉我更多信息以正确理解这些概念。谢谢。 最佳

java - 找不到扩展 CordovaActivity 的 Java 文件。当使用 "cordova build"

我的电脑是Windows864位,我为我的项目安装了cordova和android平台,我通过输入cordovacreatehellocom.example.helloHelloWorld和cordovaplatformadd创建了我的项目安卓但是当我运行cordovabuild时,它显示以下错误:[错误:找不到扩展CordovaActivity的Java文件。]我在网上搜索过,但还没有找到解决办法,请问这是什么问题? 最佳答案 当我从另一个项目克隆我的存储库时,我遇到了同样的错误。我通过删除平台并重新添加来解决它。删除:cordo

java - 错误 :The processing instruction target matching "[xX][mM][lL]" is not allowed

这个问题在这里已经有了答案:Error:Theprocessinginstructiontargetmatching"[xX][mM][lL]"isnotallowed(11个答案)关闭6年前。我正在使用eclipse编写一个android应用程序,但我停了下来。我尝试用关闭我的代码但是我一直收到错误信息"Theprocessinginstructiontargetmatching"[xX][mM][lL]"isnotallowed."代码如下:我做错了吗?如果我这样做了,请通知我。

java - 警告 : File for type '[Insert class here]' created in the last round will not be subject to annotation processing

我将现有代码库切换到Java7,但我不断收到此警告:warning:Filefortype'[Insertclasshere]'createdinthelastroundwillnotbesubjecttoannotationprocessing.快速搜索显示没有人遇到此警告。它也没有记录在javac编译器源代码中:来自OpenJDK\langtools\src\share\classes\com\sun\tools\javac\processing\JavacFiler.javaprivateJavaFileObjectcreateSourceOrClassFile(booleani

java - : Unable to Process Jar entry如何解决

我在控制台上收到此错误。谁能帮帮我(我正在使用GWT和Maven开发一个SpringMVC项目)SEVERE:UnabletoprocessJarentry[com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class]fromJar[jar:file:/C:/Users/ayush/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/transconnect/WEB-INF/lib/icu4j-2.6.1.jar!/]forannotations

java - 使用 -XX :HeapDumpPath option but want to integrate the process id

当使用-XX:+HeapDumpOnOutOfMemoryError时,如果指定路径下已有转储文件,JVM将不会覆盖堆转储。我希望能够在非默认位置拥有多个堆转储,并计划在堆转储路径中使用pid以实现这一点。但是,当我尝试像这样指定参数时:-XX:HeapDumpPath=some/heapdump/path/heapdump-%p.hprof然后创建堆转储,我得到了%p而不是文件名中的实际pid。但是,%p的使用似乎与-XX:OnOutOfMemoryError选项一起使用。-XX:HeapDumpPath=是否应该使用其他一些语法? 最佳答案