MTilsted
MTilsted

Reputation: 5518

How to download and use jface

I want to use JFace with my own java program, but I am not sure about how to get it.

There does not seem to be any independent download project like there is for Swt.

I did some googling and found some old threads which said I just had to take the jar files from eclipse. Is this really the best way to get JFace?

I tried to add the following jar files from my eclipse/plugins folder:

org.eclipse.jface_3.13.2.v20171022-1656.jar org.eclipse.jface.databinding_1.8.100.v20170503-1507.jar org.eclipse.jface.text_3.12.1.v20171114-1359.jar

When I add them to my project I can compile a simple JFace test program, but when I try to run it I get

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/ISafeRunnable

So which dependencies does JFace have on eclipse?

Upvotes: 2

Views: 3580

Answers (1)

Loris Securo
Loris Securo

Reputation: 7638

[...] I just had to take the jar files from eclipse. Is this really the best way to get JFace?

As far as I know, yes.

So which dependencies does JFace have on eclipse?

To use JFace you should include these jars from the eclipse/plugins folder:

org.eclipse.core.commands_<version info>.jar
org.eclipse.equinox.common_<version info>.jar
org.eclipse.jface_<version info>.jar
org.eclipse.osgi_<version info>.jar
org.eclipse.ui.workbench_<version info>.jar  -> not required but recommended

For more information see https://wiki.eclipse.org/JFace.

Upvotes: 2

Related Questions