gentoo eclipse swt
最近学习使用 eclipse rcp 来做一些插件。
首先下载安装 eclipse-rcp,然后安装 swt
emerge -av swt
安装完成以后, 在 /usr/portage/distfiles/ 中找到 swt* 的压缩包,然后解压到 /usr/local/src 中去。
当然也可以在 eclipse 官网上面下载最新的 源码 ,网址类似这样 https://archive.eclipse.org/eclipse/downloads/drops4/R-4.9-201809060745/
打开 eclipse-rcp,新建项目后,项目属性中 java build path --> Libraries 中添加 /usr/local/src/swt 里面的 swt.jar 包。 然后在项目文件的 swt.jar 包上右键属性,java source attachment 中选择 源文件目录 /usr/local/src/swt 中的 swt.zip 包。
调试无问题后,打包后, 使用 java -jar 来运行 jar 包, 提示 Error: Could not find or load main class HelloSWT。
使用 jar xvf helloSWT.jar 来解压缩 jar 包, 在METE-INF/MANIFEST.MF 文件中添加 Class-Path:swt.jar
再次运行,提示 no main manifest attribute, in helloSWT.jar
发现这样不行,重新导出的时候,发现还有一个选项是 runable jar file export, 选择这个选项,然后选择导出路径,下面三个依赖包的选项意思是:
(1)Extract required libraries into generated JAR。
把所有的import JAR都拆开来,包含在JAR的各个目录中,ex. net/org/xxx.class
(2)Package required libraries into generated JAR。
把所有的import JAR都包在JAR的根目录下
(3)Copy required libraries into a sub-folder next to the generated JAR。
把所有import JAR放在JAR外面独立的一个文件夹
正常我选择第二种, package打包,生成的 jar包,使用 java -jar,就可以正常运行了。
gentoo eclipse swt的更多相关文章
- Eclipse swt开发环境搭建
原料: eclipse swt.下载链接为: Eclipse 4.6.2 Release Build: 4.6.2 配置说明: Developing SWT applications using Ec ...
- org.eclipse.swt.custom.StyledText.getScrollbarsMode()I
错误: org.eclipse.swt.custom.StyledText.getScrollbarsMode()I 解决方法: 1 卸载,并手工清除myeclipse全部文件 2 重新安装myecl ...
- 报错:org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:4517)
在Mars.Kepler的版本裡,時常會出現以下錯誤導致eclipse無法進行運作 Error.log org.eclipse.swt.SWTError: No more handles at ...
- 解决ubuntu 14.04 下eclipse 3.7.2 不能启动,报Could not detect registered XULRunner to use 或 org.eclipse.swt.SWTError: XPCOM 等问题的处理
对于eclipse 3.7.2在ubuntu 14.04下不能启动,需要在 eclipse/configuration 目录下的config.ini文件内增加一行org.eclipse.swt.bro ...
- org.eclipse.swt.SWTException: Invalid thread access问题解决方法
转自 http://blog.csdn.net/ecjtuxuan/article/details/2125023 怎么解决SWT多线程错误:Caused by: org.eclipse.swt.SW ...
- myeclipse启动错误:org.eclipse.swt.SWTError: No more handles
myeclipse启动错误,生成日志: !SESSION 2014-11-06 09:13:16.296 ----------------------------------------------- ...
- 解决Eclipse异常关闭后重启报 org.eclipse.swt.SWTException: Invalid thread access 的问题
. . . . . 很久没有写博客了,最近实在是太忙,一直想写点干货,但是一直没静下心来学习. 今天又在加班忙碌之中,结果谁知道越忙碌越出问题.先是 weblogic 没有正常启动,凭经验第一反应就是 ...
- eclipse报这个错误org.eclipse.swt.SWTError: No more handles (eclipse 和 TeamViewer 冲突)
错误: org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:4387) a ...
- org.eclipse.e4.core.di.InjectionException:org.eclipse.swt.SWTException: Widget is disposed
org.eclipse.e4.core.di.InjectionException:org.eclipse.swt.SWTException: Widget is disposed 开发环境为ecli ...
随机推荐
- LB+nginx+tomcat7集群模式下的https请求重定向(redirect)后变成http的解决方案
0. 环境信息 Linux:Linux i-8emt1zr1 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 x86_6 ...
- Vivado HLS初识---阅读《vivado design suite tutorial-high-level synthesis》
Vivado HLS初识---阅读<vivado design suite tutorial-high-level synthesis> 1.启动 2.创建工程 3.添加源文件 4.添加测 ...
- python基本知识点
1.基本数据类型 1.1int 字符串转换为数字,比如 a = “123” print(type(a) , a) b = int(a) print(type(b),b) num = “b” v = i ...
- Azure REST API (4) 在Python环境下,使用Azure REST API
<Windows Azure Platform 系列文章目录> 之前遇到的项目中,客户需要在Python环境下,监控Azure VM的CPU利用率,在这里简单记录一下. 笔者的环境是Win ...
- table thead 置顶
table tbody { display:block; max-height:300px; overflow-y:scroll;}table thead, tbody tr { display:ta ...
- LeetCode——11. Container With Most Water
一.题目链接:https://leetcode.com/problems/container-with-most-water/ 二.题目大意: 给定n个非负整数a1,a2....an:其中每一个整数对 ...
- HTTP/HLS/RTMP超级负载测试工具
这个负载测试工具是网游分享的工具,可以在http://blog.csdn.net/win_lin/article/details/11835011 或者https://github.com/winli ...
- docker容器使用
查看容器的配置信息 # docker inspect dc4e2ff3eb58 查看容器的网络信息 # docker inspect -f {{.NetworkSettings}} node4 [ro ...
- Jmeter(二十)Beanshell or JSR223
有关Beanshell和JSR223组件的部分,早就想写一大篇幅随笔进行记录,苦于不知如何去描述这两部分的内容,一直在修改随笔. 介绍一下Beanshell: Beanshell是轻量级Java,支持 ...
- ArcMap VBA实现连续编号
连续编号VBA部分:Static lCount as longlCount=lCount+1赋值部分:lCount (从1开始)lCount-1 (从0开始)