|
Re: Using JavaFX 2.0 in an Eclipse view [message #781798 is a reply to message #781628] |
Sun, 22 January 2012 09:39 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
Well you need to make yourself familiar with OSGi - modifying the build
path is not an option!
You have 3 possibilities:
a) bundle the fx-libraries with your plugin and adjust your MANIFEST.MF
b) repackage them and add a dependency
c) enhance the OSGi classloader to locate the libs on the filesystem
Now haveing told you those technical things I could simply pointed you
to http://www.efxclipse.org/ which provides you solution c) and
hopefully soon b) as well. It currently has set the lowest version to
3.7.0. Is there a reason it must run on 3.6.0?
Tom
Am 21.01.12 22:24, schrieb Balint Torok:
> Hello,
>
> my goal is to create a simple Eclipse view with some graphics in it
> (imagine a simple UML diagram) using JavaFx 2.0. I'm using Eclipse 3.6
> and Java 1.6.
>
> First I created a plugin project with a view from the Eclipse examples.
> Then I modified the SampleViev.createPartControl(Composite parent)
> of the generated view class to look like this:
>
>
> public void createPartControl(Composite parent) {
> Composite composite = new Composite(parent, SWT.EMBEDDED);
> FXCanvas fxPanel = new FXCanvas(composite.getShell(),
> SWT.NONE); Group group = new Group();
> Scene scene = new Scene(group);
> Button button = new Button("JFX Button");
> group.getChildren().add(button);
> fxPanel.setScene(scene);
> }
>
>
> I did manage to set the build path to be able to compile this, but didn't
> manage to make it run. I just can't figure out how to set up the runtime
> classpath. The assumption is that the user has JavaFX 2.0 installed, so
> I wouldn't
> like to include the JavaFX libs into the plugin, I just want to use what is
> already there on the users box.
>
> Could you please advise on how to set up my plugin to use the already
> existing JavaFX installation? Or am I going in the wrong direction, and
> I should incorporate the JavaFX library into my plugin (if yes then how)?
>
> Thanks.
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.31630 seconds