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
Tara Seth
467 PointsJava Help, please!
Hey guys, I've been doing Java in Treehouse, but I want to expand practice what I've learned in NetBean. Because Treehouse sets up the needed framework (not sure if this is the right term) to use console functions and declare Strings, I don't know how to begin in NetBean. Can somebody give me some basic lines of code to use in NetBean that will allow me to practice the material covered in the Basics of Java? I think it's just loading packages, yes?
Thanks so much
2 Answers
Jonathan Petersen
45,721 PointsIn Netbeans you can create a new project with existing sources.
File -> New Project -> Java -> Java Project with existing sources
Name the project, and click next. Ignore the build.xml stuff for now. On the existing sources page, click 'Add Folder' then add the src folder from the downloaded files.
Once you get to the projects that require resources (JavaFX), it will become a bit messier, but it is definately dooable.
Let me know if you need any help, I also prefer Netbeans.
FYI .. They probably could have avoided issues like this if they would have used Gradle instead. Sometime, sooner rather than later, you will want to learn about Gradle.
Jonathan Petersen
45,721 PointsYes, the src folder from the downloaded file.
Instead of console use System.out.printf("Hello");
Gradle is not necessarily intuitive. Which is probably why they didn't use Gradle for the course. I was just saying that this is something you should learn.
Tara Seth
467 PointsTara Seth
467 Pointssrc folder from downloaded files?
Also, tried to download Gradle, either it's not intuitive or I'm tired.
Pretty overwhelmed at the moment. My issue with NetBeans was that it wouldn't let me use things like console.printf("Hello"); because I didn't know how to import console. Looked that up, but still didn't work (I tried import.io.Console)... I got around that at first by using out.println but then it also doesn't allow ("Hello, my name is %s", myName); which is frustrating. I think there's something I'm missing in the setup of the first few lines of code.