Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Local Development Environments Advanced Tooling Finishing TreeStory

Peng Liu
PLUS
Peng Liu
Courses Plus Student 14,273 Points

can not run java file

Hi, everyone out there:

It is strange that I can not run the main.java file. I downloaded the zip file, unzipped the TreeStory 2 zip, went to IntelliJ editor and used "open" opened the TreeStory project. All files are there, setup the JDK as requested. I then jumped to main.java file, click "RUN" on the top menu bar, it keeps asking me for "Edit configuration", never run the file. All files are in their right path and location. don't know why; any help would be appreciated.

Peng

com/teamtreehouse/Main.java
// After you've completed the TODOs locally paste Main.java here
com/teamtreehouse/Prompter.java
// After you've completed the TODOs locally paste Prompter.java here
pseudo-tests.md
#  This is essentially what I am testing 
1.  The user is prompted for a new string template (the one with the double underscores in it).

  a. The prompter class has a new method that prompts for the story template, and that method is called.

2.  The user is then prompted for each word that has been double underscored.

   a. The answer is checked to see if it is contained in the censored words.
      User is continually prompted until they enter a valid word

3.  The user is presented with the completed story
Peng Liu
Peng Liu
Courses Plus Student 14,273 Points

Thank you Grigorij for spending your time responding to my question. With tips from you and Seth , I was able to set the Mainclass to the right one in the Edit Config window and compile and run the java files afterwards.

appreciated, Peng

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

Hey Peng,

keep on doing the good job !

See you in the forum :)

1 Answer

Seth Kroger
Seth Kroger
56,413 Points

In the Edit Configurations window, there should be a place to choose the "Main class" at the top. (Add an application config on the left if you don't have one yet.) Click the 3 dots on the right and it should pull up a list with a class to choose.

Peng Liu
Peng Liu
Courses Plus Student 14,273 Points

Hi, Seth: Thanks for your very in time response and info, I go to the edit config window, set that "Main class" to"com.teamtreehouse.Main", confirm it. I then debugged it once, and be able to run the main.java file finally, really appreciate your tip and time spent on my question, I am currently stuck on that "teamwork TODO challenge" at the end of the local java development environment section. I will give it more tries to see if I pass. Meanwhile, thank you again for your time reading this.

nicely, Peng