0

I'm taking this Oracle tutorial and on the page about Anonymous classes. In it, is an example of a Say "Hello World" button.

I'm getting import javafx cannot be resolved errors.

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

What do I need to change in my Eclipse configuration to run this?

StacyM
  • 1,036
  • 5
  • 23
  • 41
  • have you downloaded and configured the JavaFX SDK? – Brett Holmes Aug 01 '14 at 00:20
  • I'm new to Java and programming in general. I have no idea what "downloaded and configured JavaFX SDK" means. It looks like I have a lot of digging and research ahead of me. Ugh. – StacyM Aug 01 '14 at 00:29
  • I'm new to java, but if you click the link in my answer it should show you how to download and configure JavaFX if you just scroll down to the section about running JavaFX on Eclipse. – Brett Holmes Aug 01 '14 at 00:32
  • Yes, it's a duplicate. I'll delete this one. I just don't understand anything on the one you linked...I get a "this page has moved" message on your first link... – StacyM Aug 01 '14 at 00:37
  • I mean't look at the link that is at the bottom of my answer. Sorry for not clarifying. "Referenced: http://www.packtpub.com/article/installing-and-setting-javafx-netbeans-and-eclipse-ide " – Brett Holmes Aug 01 '14 at 00:39
  • I'm stuck on step 3. It says add http://www.oracle.com/technetwork/java/javafx/downloads/index.html as the plug in site. The link says the page has been moved. – StacyM Aug 01 '14 at 00:42
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/58459/discussion-between-photographybum-and-stacym). – Brett Holmes Aug 01 '14 at 00:44

1 Answers1

1

Use this link to download and install JavaFX 2: http://www.eclipse.org/efxclipse/install.html#for-the-lazy

Brett Holmes
  • 397
  • 5
  • 20
  • 1
    Thanks, I found this too http://stackoverflow.com/questions/8241525/how-to-use-javafx-2-sdk-in-eclipse. Down the rabbit hole I go! – StacyM Aug 01 '14 at 00:27
  • 1
    The information in this answer is obsolete and misleading as it refers to JavaFX 1.x technology which is not available anymore. The preferred way for an Eclipse user to use JavaFX is to use the [e(fx)clipse toolset](http://www.eclipse.org/efxclipse/index.html) as recommended in the answers to the duplicate question. – jewelsea Aug 01 '14 at 18:04
  • @jewelsea Answer has been fixed. – Brett Holmes Aug 01 '14 at 18:25