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 trialLuis Herrera
2,744 PointsCan't create new Package or Class
Good evening,
I' am trying to create a new package/class in my java folder that is right under my main folder. Unfortunately when I right click on the java folder and choose new I do not see "package" or "class" as an option. I only "file" and "Directory" as an option.
Is there a feature in IntelliJ that I have to enable in order to allow me to create packages or class files? It is possible I have a older version of intelliJ? Is this feature available for the community edition as this is what I' am currently running.
I look forward to some help on this matter.
Thank you for your time.
Solomon Alexandru
3,633 PointsThe feature should be available in the community edition. Try creating them using CTRL-N on Windows, or COMMAND-N on Mac. If it's still not working, try updating your IDE, or reinstalling it.
Thomas Wang
11,335 Points'java' directory must be marked as Source Root (In this case, it appears in blue).
If this is not the case, right click 'java' directory -> Mark Directory As -> Source Root.
1 Answer
Robert Morea
4,040 PointsThanks Thomas Wang (see his comment, which should be "best answer")!
Hey, Treehouse! Every. Single. Step. Of this tutorial. Has some hitch or other where IntelliJ or Gradle or Spring changed some tiny thing, and it no longer works the way you are saying it does. Or maybe you are assuming something and just forgot to tell us about it. I don't actually think you can fix this, but maybe you should think about (I am convinced you should think about) not making your courses so dependent on constantly changing toolsets. If you aren't going to update them with every release, which of course you aren't, it's a killer. As such, I don't want to do this whole program in your embedded editor, but maybe you could find something a little less fluid to use as your default environment (i think you should).
Navid Afzal
1,389 PointsTeam Treehouse - it's been a year since Robert' posted his comment and this still hasn't been addressed. It's understandable; it must be difficult to create courses that aren't stuck in a period of time with how fast things change but perhaps annotations on each video when a step has changed would be useful and keep the course material fresh with minimal effort.
On the brightside, this course teaches how to troubleshoot pretty well.
Charles Cloud
6,134 PointsCharles Cloud
6,134 PointsCan you add a screenshot? Also can you make sure you didn't misspell anything? Also make sure you set up the project correctly (re-watch the video if necessary)