Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Why does Eclipse not let me run the "..."demo.java files?

+9 votes
The handout suggests that we should "play with these files: run them, read the code to understand what they (do) and how they work..." but when I try to run them within Eclipse, a "Run As" window appears and gives me only two options; "Ant build" and "Ant Build...". Neither one of the two produce any output. any suggestions as to what I can do in order to see an output on the console for both KeyboardInputDemo.java & AnamationDemo.java?
asked Dec 3, 2015 in (Winter 15-16) by Kyle Doner 1 (100 points)

2 Answers

+3 votes
Did you download and import the programs like it says in the instruction? If not, try that.


For me I couldn't even download them, so I just made my own classes with the same names and copied everything from the files on moodle, which worked.
answered Dec 3, 2015 by Erik Anderberg (100 points)
+2 votes
I suspect that you didn't properly import your .java files into your project.

You need to make sure that you drag them into your "src" folder within the project.  Was that the problem?
answered Dec 3, 2015 by Forrest Stonedahl (100 points)