Java 如何在netbeans中使用gradle插件查找本机库来获取项目?
我正在尝试找出gradle和netbeans插件。我可以很容易地将简单的项目组合在一起,但是当我试图将一个使用JOGL的项目转换为gradle时,我遇到了问题。我可以让它编译,但当我试图让它运行时,它却不能。我假设它没有找到本机库 这是我的身材。格雷德尔:Java 如何在netbeans中使用gradle插件查找本机库来获取项目?,java,netbeans,gradle,build.gradle,jogl,Java,Netbeans,Gradle,Build.gradle,Jogl,我正在尝试找出gradle和netbeans插件。我可以很容易地将简单的项目组合在一起,但是当我试图将一个使用JOGL的项目转换为gradle时,我遇到了问题。我可以让它编译,但当我试图让它运行时,它却不能。我假设它没有找到本机库 这是我的身材。格雷德尔: apply plugin: 'java' apply plugin: 'application' sourceCompatibility = '1.6' [compileJava, compileTestJava]*.options*.e
apply plugin: 'java'
apply plugin: 'application'
sourceCompatibility = '1.6'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = 'com.protocase.viewer.JDesigner'
}
repositories {
mavenCentral()
maven {
url "https://repository.apache.org/content/repositories/snapshots/"
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
compile files('../logger/dist/logger.jar')
compile files('../postalker/build/libs/postalker.jar')
compile group: 'org.yaml', name: 'snakeyaml', version: '1.15+'
compile group: 'commons-io', name: 'commons-io', version: '2.4+'
compile group: 'gov.nist.math', name: 'jama', version: '1.0.3+'
compile group: 'org.apache.commons', name: 'commons-imaging', version: '1.0-SNAPSHOT+'
compile group: 'com.itextpdf', name: 'itextpdf', version: '5.5.5+'
compile files('/home/vextorspace/.netbeans/8.0.2/jogl-runtime/jogl.jar')
compile files('~/.netbeans/8.0.2/jogl-runtime/jogl.jar-natives-linux-amd64/libjogl_awt.so'\
, '~/.netbeans/8.0.2/jogl-runtime/jogl.jar-natives-linux-amd64/libjogl_cg.so', '~/.netbeans/8.\
0.2/jogl-runtime/jogl.jar-natives-linux-amd64/libjogl.so')
runtime fileTree(dir: '~/.netbeans/8.0.2/jogl-runtime/jogl.jar-natives-linux-amd64/', incl\
ude: '*.so')
compile files('~/.netbeans/8.0.2/gluegen-runtime/gluegen-rt.jar')
runtime files('~/.netbeans/8.0.2/gluegen-runtime/gluegen-rt.jar-natives-linux-amd64/libglu\
egen-rt.so')
compile files('libs/toxiclibscore.jar')
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.5+'
compile group: 'commons-codec', name: 'commons-codec', version: '1.6'
compile group: 'commons-logging', name: 'commons-logging', version: '1.1.3'
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.3.3'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.6'
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.6'
}
任何帮助都将不胜感激
谢谢在构建脚本的路径中避免使用平铺字符。当您在命令行上使用bash时,它会被解释,Gradle对此一无所知。好的,这比我预期的要简单得多!非常感谢你。
Executing: gradle run
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/gluegen/runtime/DynamicLookupHelper
at java.lang.ClassLoader.defineClass1(Native Method)