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
Dustin Knudsen
1,616 PointsUsing an IDE alternative "Eclipse" to workspace?
Hey all. I started learning the Android course with Ben Jakuben, and then when we hit the Java part involving methods and classes, my head flew off its hinges so now I'm on the Java course trying to learn Java and trying to keep my head from flying into outer space.
Okay on to the question: While using the Treehouse Workspace to explore Java is fun, I'd like to try it with an external IDE. General consensus seems to be that Eclipse is the best IDE for Java. I downloaded it and I have absolutely no clue what I'm doing. Is there another Java IDE that is more newbie friendly or are there any helpful hints to starting a "standard" workspace in Eclipse that would coincide with what I'm learning in the Java Basics/Objects course? I hope this question is clear and within the proper context of this forum.
Nicolas Hampton
44,725 PointsFor what it's worth, as something without all the frills, bells and whistles of IntelliJ and Eclipse, www.sourcelair.com is an online IDE that runs java. I'm almost certain that it's not going to be good to use on the job, but for learning java and all the exercises in the Java course so far, it works well I've found. It also includes Git and has some handy GUI interfaces for committing and pushing code, and it's simple and clean. As a learner, I've found it really useful, but it doesn't have java-repl installed, which I love to test little bits of code. For my first couple of console based applications, I've found it really useful. I tried IntelliJ and a couple others, and found them a little advanced to start out with.
4 Answers
Ken Alger
Treehouse TeacherDustin;
Eclipse is a popular IDE and can indeed be a bit confusing to start with. Another major player, which Android Studio is based off of, is IntelliJ by Jet Brains. They have a free version as well and is, in my opinion, easier to learn than Eclipse and if you are wanting to return to Android development it is a great thing to learn.
In terms of using an IDE for the Treehouse Java courses, you can with some alterations. Much of the output in the courses relies on the use of the Console Class in Java. Neither Eclipse nor IntelliJ support console, so you will need to use alternative methods.
Post back if you have additional questions.
Ken
Craig Dennis
Treehouse TeacherGood news, I'm working on the next course called Local Development Environments. I will walk through setting up your local machine and using an IDE, we'll focus first on IntelliJ, but I plan to follow up with workshops on Eclipse and NetBeans. I'll get it added on the roadmap this week most likely.
Igor Demchenko
1,433 PointsWas it added and where to look for it if it was? I tried several other options, including ones advised in this thread, but can't make it work the way it should. Looking forward to try LDE for Java Object course. Thanks!
Dustin Knudsen
1,616 PointsSome great information here. The "alternative methods" to console class would have to be referring to system.out commands for printing lines, am I correct, Ken? In terms of IDE, thanks for the IntelliJ suggestion. I have a Java textbook which actually is helping me learn the proper way to execute basic programs similar to what I'm learning in the Java Basics/Java Objects courses. I did not realize they had a section on both NetBeans and Eclipse that I discovered after I had posted my question. I will post what I've found here in case it can be used as a reference to anyone else with similar questions or problems. It will be nearly verbatim so I hope that doesn't count as plagiarism. But to cover my butt, the source is Introduction to Java Programming, Comprehensive Version, 10th Edition, Y. Daniel Liang Copyright 2015
Steps to create a Java project in Eclipse:
Choose File, New, Java Project to display the New Project wizard
Type demo in the Project name field (or whatever you want). As you type, the Location field is automatically set by default. You may customize the location for your project.
Make sure that you selected the options Use project folder as root for sources and class files so that the .java and .class files are in the same folder for easy access. [emphasis added]
Click Finish to create the project
After a project is created, you can create Java programs in the project using the following steps:
Choose File, New, Class to display the New Java Class wizard.
Type Welcome in the Name field (or choose whichever name is fit for your project)
Check the option public static void main(String[] args).
Click Finish to generate the template for the source code Welcome.java (or whatever your class name was)
To run the program, right-click the class in the project to display a context menu. Choose Run, Java Application in the context menu to run the class. The output is displayed in the Console pane
I have just barely forayed into Java/Eclipse territory and I could find Eclipse a little too intermediate for my liking so I'll keep an open mind to your suggestions Ken. Thanks a lot.
Carter Pringle
3,416 PointsPersonally I love NetBeans. I find it a lot simpler to use than Eclipse
daniwao
13,125 Pointsdaniwao
13,125 PointsFrom what I've looked around and used, Eclipse is a good IDE to write Java in. I know that if you move on to the Android course again, that they use Eclipse, but for Android development, I use Android Studios. It's gotten a lot user-friendly since it's first debut.