用于打开TIFF(类型4)图像的Eclipse扩展 [英] Eclipse extension for opening TIFF (type 4) images?

查看:206
本文介绍了用于打开TIFF(类型4)图像的Eclipse扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从Java流中在Eclipse中显示一个TIFF(类型4)映像。 TIFFv4不支持,所以我需要一个图像库。 Sun的JAI-ImageIO具有本机代码 - 我无法将其轻松插入到插件中。我不能从lib \ext目录导入jai-imageio.jar(et al),因为Eclipse有自己的类路径想法。对于在Eclipse中可用的图像扩展/库的任何建议,

I need to display a TIFF (type 4) image in Eclipse from a Java stream. TIFFv4 is not supported, so I need an image library. Sun's JAI-ImageIO has native code -- I can't wrap it easily into a plugin. I can't just import jai-imageio.jar (et al) from the lib\ext directory because Eclipse has its own ideas about classpaths.

虽然我已经将同一个核心代码编译并在同一个Eclipse(Galileo)上作为标准Java程序运行,但当我将其作为Eclipse BIRT扩展的一部分时(我修改了RotatedLabel ReportItem示例),它失败。发生什么是代码编译(我将jar添加到jre\lib\ext目录),并且在运行时失败,出现以下错误(在日志文件中):

Although I've got the same core code compiling and running on the same Eclipse (Galileo) as a standard Java program, when I make it part of an Eclipse BIRT extension (I modified the RotatedLabel ReportItem example), it fails. What happens is that the code compiles (I added the jars to the jre\lib\ext directory) and it fails at runtime with the following error (in the log file):


严重:运行报告时发生错误。
java.lang.NoClassDefFoundError:javax / media / jai / PlanarImage
在org.eclipse.birt.sample.reportitem.rotatedlabel.util.GraphicsUtil.createDocImage(GraphicsUtil.java:64)
at org.eclipse.bat.report.engine.extension.ReportItemPresentationBase.onRowSets(ReportItemPresentationBase.java:218 )

SEVERE: Error happened while running the report. java.lang.NoClassDefFoundError: javax/media/jai/PlanarImage at org.eclipse.birt.sample.reportitem.rotatedlabel.util.GraphicsUtil.createDocImage(GraphicsUtil.java:64) at > org.eclipse.birt.sample.reportitem.rotatedlabel.RotatedLabelPresentationImpl.onRowSets(RotatedLabelPresentationImpl.java:135) at org.eclipse.birt.report.engine.extension.ReportItemPresentationBase.onRowSets(ReportItemPresentationBase.java:218)


推荐答案

我不知道这将是足够的,但如果你需要的是为了让jai-imageio.jar等到你的Eclipse类路径中,你可以在你的插件和插件的类路径中添加所需的jar,并在运行时可以使用插件。

I'm not sure this will be sufficient, but if all you need is to get the jai-imageio.jar et al into your Eclipse classpath, you can add the required jars to your plugin, and plugin's classpath and they will be available to the plugin at runtime.

这些是将jar包含在插件中的步骤。

These are the steps to include the jars in your plugin.


  • 在插件下方创建一个lib文件夹。 li>
  • 将jars添加到该文件夹​​。

  • 修改插件的类路径包括这些jar - 在清单的运行时选项卡中,单击类路径部分中的添加... 按钮,然后选择所有jar。

  • 如果需要,导出包(例如如果您有多个插件需要访问包) - 在清单编辑器的运行时选项卡中,单击导出的包部分中的添加... 按钮并选择其他插件所需的任何软件包。

  • Create a "lib" folder below your plugin.
  • Add the jars to that folder.
  • Modify the classpath of the plugin to include those jars - In the runtime tab of the manifest, click the Add... button in the Classpath section and select all the jars.
  • Export the packages if needed (e.g. if you have more than one plugin that needs access to the packages) - In the runtime tab of the manifest editor, click the Add... button in the Exported Packages section and select any packages other plugins will need.

这篇关于用于打开TIFF(类型4)图像的Eclipse扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆