- 浏览: 1124273 次
- 性别:
- 来自: 火星郊区
博客专栏
-
OSGi
浏览量:0
文章分类
- 全部博客 (695)
- 项目管理 (48)
- OSGi (122)
- java (79)
- Vaadin (5)
- RAP (47)
- mysql (40)
- Maven (22)
- SVN (8)
- 孔雀鱼 (10)
- hibernate (9)
- spring (10)
- css (3)
- 年审 (6)
- ant (1)
- jdbc (3)
- FusionCharts (2)
- struts (4)
- 决策分析 (2)
- 生活 (10)
- 架构设计 (5)
- 破解 (2)
- 狼文化 (4)
- JVM (14)
- J2EE (1)
- 应用服务器 (1)
- 我的链接 (5)
- 数学 (2)
- 报表 (1)
- 百科 (6)
- Flex (7)
- log4j (2)
- PHP (1)
- 系统 (2)
- Web前端 (7)
- linux (6)
- Office (1)
- 安全管理 (5)
- python (2)
- dom4j (1)
- 工作流 (3)
- 养生保健 (4)
- Eclipse (8)
- 监控开发 (1)
- 设计 (3)
- CAS (1)
- ZK (41)
- BluePrint (3)
- 工具 (1)
- SWT (7)
- google (2)
- NIO (1)
- 企业文化 (2)
- Windoes (0)
- RCP (7)
- JavaScript (10)
- UML (1)
- 产品经理 (2)
- Velocity (10)
- C (1)
- 单元测试 (1)
- 设计模式 (2)
- 系统分析师 (2)
- 架构 (4)
- 面试 (2)
- 代码走查 (1)
- MongoDB (1)
- 企业流程优化 (1)
- 模式 (1)
- EJB (1)
- Jetty (1)
- Git (13)
- IPV6 (1)
- JQuery (8)
- SSH (1)
- mybatis (10)
- SiteMesh (2)
- JSTL (1)
- veloctiy (1)
- Spring MVC (1)
- struts2 (3)
- Servlet (1)
- 权限管理 (1)
- Java Mina (1)
- java 系统信息 (6)
- OSGi 基础 (3)
- html (1)
- spring--security (6)
- HTML5 (1)
- java爬虫搜索 (1)
- mvc (3)
最新评论
-
Tom.X:
http://osgia.com/
将web容器置于OSGi框架下进行web应用的开发 -
chenyuguxing:
你好, 为什么我的bundle export到felix工程中 ...
在Apache Felix中运行bundle -
string2020:
<niceManifest>true</ni ...
Bundle Plugin for Maven -
jsonmong:
OSGI,是未来的主流,目前已相当成熟。应用OSGI比较好的, ...
基于OSGi的声明式服务 -
zyhui98:
貌似是翻译过来的,有很少人在linux上做开发吧
如何成为“10倍效率”开发者
平常进行 rap 程序开发一般都是在 win 下面完成 , 然后在 tomcat 下面测试 , 但是程序最终发布一般都是在 linux aix 上面 , 这个时候就有能会出现一下问题,下面 2 个问题是我们把在开发中真是出现的问题,与大家一起分享下 ;
1、 图片路径
这个是最常用的方法,就是在 rap 中加载图片进行显示,刚开始我们使用的是如下代码
- public static String getRoot() {
- String path = null ;
- try {
- path = FileLocator.toFileURL (Platform.getBundle (Activator. PLUGIN_ID ).getEntry( "" )).getPath();
- path = path.substring(path.indexOf( "/" ) + 1 , path.length());
- }
- catch (Exception e) {
- log .error( "getRoot method :" , e);
- }
- return path;
- }
来获得系统的跟路径 . 但是当程序在移植到 linux 和 aix 上面的时候发现图片路径全部失效 . 可以使用如下方式进行寻址来获得图片。
- /**
- * 获取图片
- * @param fileName
- * 图片的名称
- * @return 先从缓存对象中查找,若有直接返回,若没有,则将图片加载到缓存中,在从缓存中将图片传给调用着
- */
- public static Image getImage(String fileName) {
- Bundle bundle = Platform.getBundle ( "TelecomUI" );
- URL url = bundle.getEntry( "icons" );
- try {
- url = Platform.asLocalURL (url) ;
- }
- catch (Exception e) {
- }
- Image image = registry .get(fileName);
- if ( null != image) {
- return image;
- }
- else {
- URL fullPathString = bundle.getEntry( "icons/" + fileName);
- ImageDescriptor des = ImageDescriptor.createFromURL (fullPathString);
- registry .put(fileName, des);
- return ImageDescriptor.createFromURL (fullPathString).createImage();
- }
- }
2、 获得屏幕的分辨率
因为需要把一些弹出的组件居中显示 , 这个时候就需要获得系统的分辨率
刚开始我们使用的方法如下;
- screenH = Toolkit.getDefaultToolkit().getScreenSize ().height;
- screenW = Toolkit.getDefaultToolkit().getScreenSize ().width;
上面这段代码在 window 下面是没有问题的 , 可是到了 linux 和 aix 下面就报错了 , 找不到
sun.awt.X11.XToolkit 类
可以采用如下方式来获得屏幕的分辨率
3、 其他如果有发现不兼容会陆续补充
发表评论
-
RCP开发者的好去处之ICON系列(持续更新中... ...)
2012-03-31 10:13 1091为了找个合适的图片是不是头大的不像样子了?OK,我现在就 ... -
RAP 整合 Spring (基于 Spring-osgi )
2012-03-31 10:12 1351RAP 介绍请见: http://www.eclipse. ... -
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
2012-03-25 14:50 1423引用 在rcp的路径添加了mysql驱动,并添加之cla ... -
解决JFace Dialog中ScrollComposite无法滚动
2012-03-26 10:26 1550今天写了一个Jface的dialog,作为配置界面,其中有 ... -
SWT实现弹出日历控件
2012-03-27 08:00 2532实现像网页上的那种用户单击一个Text框然后框下面出现一个日历 ... -
JFace进度条
2012-03-27 08:01 1082Java代码 someB ... -
getConfigurationElementsFor 无法获得扩展点的信息
2012-03-26 10:27 1062做项目的时候RCP程序在eclipse调试环境下面运行正常 ... -
测试rcp 和 rap 何时触发 组建.addListener(SWT.xxx, new Listener() )的方法
2012-02-24 14:22 1234Java代码 直接通过反射让组建监 ... -
RAP 界面显示不完全的问题
2012-02-24 14:22 1177rap运行第一刷新界面总是刷新不完整,组件错位,后台报Layo ... -
Uploading files with RAP 1.4
2012-02-17 11:37 1581One of the new things in RAP 1. ... -
【RAP】CAS PIA 快速浏览入口地址
2012-02-07 08:23 1208下面的链接是访问RAP应用的入口。有2中方式,图片上已经注明。 ... -
RAP 与 RCP的区别
2012-02-07 08:23 1287RAP 可以让开发人员使用 JAVA API 和按照 E ... -
将Eclipse RAP部署到Tomcat中
2012-02-07 08:23 1094在上次成功将我的RCP项目迁移到浏览器中运行后,开始研究 ... -
RAP(Rich AJAX Platform)的可部署文件下载
2012-02-07 08:24 1108这是我自己做的RAP的可部署文件,可以下载下来解压到Tom ... -
Eclipse rcp/rap 开发经验总结(15) -rap如何使用js
2012-02-03 08:11 13991. 把输入的字符串当 javascript 执行 ... -
Eclipse rcp/rap 开发经验总结(14) -rap 图片、数据缓存处理
2012-02-03 08:10 1463一、概述 在进行了 rap 的基本学习之后,您对 rap ... -
Eclipse rcp/rap 开发经验总结(13) -Rap/Rcp保存按钮处理方式
2012-02-03 08:10 1047一、概述 在做项目的过程中,处理编辑区的保存机制的时候。发 ... -
Eclipse rcp/rap 开发经验总结(12) -Rap 优化之组件的销毁
2012-02-03 08:10 818一、概述 经过几个月的rap 项目实战,总结了一些小 ... -
Eclipse rcp/rap 开发经验总结(11) -rcp/rap与spring ibatis集成
2012-02-03 08:10 12661. rcp/rap 与 spring 集成 Activa ... -
Eclipse rcp/rap 开发经验总结(9) - rap上传与下载
2012-02-01 08:01 995一 上传 上传即将文件上传到服务器上,在客户端需 ...
相关推荐
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-linux-gtk-x86_64.tar.gz) 适用于Linux x86_64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-win32-x86_64.zip) 适用于Windows x86_64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-linux-gtk-aarch64.tar.gz) 适用于Linux aarch64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-macosx-cocoa-x86_64.dmg) 适用于macOS x86_64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-macosx-cocoa-aarch64.dmg) 适用于macOS aarch64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
Eclipse IDE for RCP and RAP Developers (includes Incubating components) Version: 2020-06 (4.16.0) Build id: 20200615-1200
Eclipse IDE for RCP and RAP linux x86_64 适用于 RCP 和 RAP 开发的工具,需要JDK11及以上运行环境。
Eclipse For RCP and RAP Developers开发包主要针对开发Eclipse插件,Eclipse RCP(富客户端应用程序),RAP(富客户端ajax应用程序)的程序员,还包含CVS、Mylyn和xml编辑器,EGit分布式版本控制等插件。...
Instant Eclipse 4 RCP Development How-to 不错的一本书
本人只会用RCP开发个C/S的程序,最近看到RAP项目想试一下,在百度上看了很多文章关于如何部署RAP到Tomcat,有些文章已经过时的了,还是没能理解清楚,最后弄了2天时间,搞来搞去没办法调试出来,最后都想放弃了。...
Eclipse Rich Ajax Platform is the first book on the new Eclipse RAP, and it introduces the required RCP and OSG/i concepts used by Eclipse RAP. This firstPress title demonstrates the functionality ...
RCP和RAP。 从其更新站点https://update.rascal-mpl.org/unstable安装不稳定版本的Rascal插件。 单击以获取更多信息。 从其中克隆Rascal项目java-build-manager并将其导入到您的工作空间中。 去! 准备好环境后: 将...
CodeMirror Eclipse 使您能够在三个上下文中使用 codemirror:Eclipse SWT、RCP 和 RAP。 它在 SWT 浏览器中嵌入了 javascript codemirror 编辑器。 它提供了几个功能: 仅使用带有 SWT/RWT 的 codemirror。 这是...
安装 Eclipse RCP/RAP 发行版。 克隆 git,即从 archiv-editor.git 导入所有项目 转到插件 org.bbaw.pdr.ae.standalone,在 Product-Editor (PDE-Tools) 中打开 Product-Configuration 文件 org.bbaw.pdr.ae....
例如,从Git存储库根目录开始的以下命令将针对同时发布暂存p2存储库构建RCP / RAP软件包: mvn clean verify -Pepp.package.rcp 此版本在两个位置创建输出: tar.gz / zip归档文件,其中的软件包位于archive/和 ...
可以直接安装 官方地址:http://www.eclipse.org/downloads/ ...Eclipse IDE for RCP and RAP Developers Eclipse Modeling Tools Eclipse IDE for Scientific Computing Eclipse IDE for Scout Developers
Eclipse 4书 这是来自vogella GmbH和的Eclipse RCP培训课程的示例代码。运行应用程序克隆项目并将所有项目导入Eclipse IDE。 然后打开目标平台项目的target-platform.target文件,并将此目标定义设置为工作空间的...