ClassNotFoundException Netbeans Maven Library包装器

时间:2012-12-20 18:59:01

标签: maven wrapper netbeans-platform

我能够按照教程here将其转换为Maven应用程序。

我的加载部分是正确的,但是当我尝试使用它时,它找不到合适的swt类(从Windows 64运行时)。我是在Maven项目上做到的。这是Windows 64模块的相应pom的相关部分:

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <!-- To have the jar plugin pickup the nbm generated manifest -->
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                    <moduleType>normal</moduleType>
                    swt.windows.64/1</codeNameBase>
                    <publicPackages>
                        <publicPackage>org.eclipse.swt</publicPackage>
                    </publicPackages>
                </configuration>
            </plugin>

我翻译成org.eclipse.swt。*。它似乎是一个Maven模块问题,因为它已经尝试从正确的模块加载。

Caused: java.lang.ClassNotFoundException: org.eclipse.swt.SWT starting from ModuleCL@25e0dee5[djproject.core] with possible defining loaders [ModuleCL@6783113b[swt.windows.64]] and declared parents [ModuleCL@32821bf7[org.netbeans.api.annotations.common]]

Caused: java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.initialize_(SWTNativeInterface.java:213)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:71)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.open_(SWTNativeInterface.java:337)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:100)
    at synamicd.windows64.support.Windows64BrowserProvider.initialize(Windows64BrowserProvider.java:25)

欢迎任何帮助!

修改 代码可用here

1 个答案:

答案 0 :(得分:1)

当我尝试在bitbucket位置构建应用程序时,它的构建顺序表明应用程序中没有使用任何swt模块 - http://screencast.com/t/LMxIPy6A6ZUL