How do you build an SWT application with Maven

后端 未结 6 1656
忘掉有多难
忘掉有多难 2020-12-29 22:57

I trying to learn swt, and I use maven for all my builds and eclipse for my IDE. When getting the swt jars out of the maven repository, I get:

Exception in t         


        
6条回答
  •  执笔经年
    2020-12-29 23:26

    I have uploaded the win32/64 & osx artifacts of the latest SWT version (4.2.2) to a googlecode repository, you can find it here:

    https://swt-repo.googlecode.com/svn/repo/

    To use it just put the following in your pom.xml:

    
        
            swt-repo
            https://swt-repo.googlecode.com/svn/repo/
        
    
    

    Then you can just reference the SWT dependency relevant to your platform. For example:

        
            org.eclipse.swt
            org.eclipse.swt.win32.win32.x86
            4.2.2
        
    

    For other platforms, just replace artifactId with the appropriate value:

    • org.eclipse.swt.win32.win32.x86
    • org.eclipse.swt.win32.win32.x86_64
    • org.eclipse.swt.cocoa.macosx
    • org.eclipse.swt.cocoa.macosx.x86_64

    Artifacts for additional platforms and older versions are available as well, visit the repository link above to find them.

    Happy coding!

提交回复
热议问题