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 trialPeter Price
4,007 PointsUsing Java in the Windows Operating System
Hi,
I want to write a program in Java for the Windows operating system, but I don't know where to start.
I would like to know in particular what to use to write the code (Android uses Android Studio).
Any information or tips that you have to share is appreciated.
8 Answers
Ken Alger
Treehouse TeacherPeter;
If you are wondering what software to write the code in, there are several different options. If you are used to Android Studio then IntelliJ would be a natural choice. Treehouse offers a Java course on Local Development Environments you may enjoy.
If you are looking for how to create a GUI based Java program that will run in Windows. Take a look at the Build a JavaFX Application course for ideas on how to make the move from console based applications to GUI applications.
Post back with further questions.
Happy coding,
Ken
Peter Price
4,007 PointsHi Ken,
Thanks for answering so quick.
What is "a GUI based Java program"?
Ken Alger
Treehouse TeacherPeter;
If you were around before the advent of Windows and Macintosh things were done predominantly with the command line. You can build applications for Windows, or Mac and Linux for that matter, that strictly use the command line and that is how the user interacts with the application. Many of the courses here on Treehouse rely on the command line for interaction. It works, but in this day and age of Windows and mobile devices, isn't thought of as very user friendly.
Enter the world of GUI, or Graphical User Interface. This will allow a user to, for example, use their mouse and have more visually stimulating interactions with the program. One can certainly program all of that stuff by oneself, mouse clicks, windows, tabs, forms, etc. but that can get rather complicated. Packages like JavaFX allow developers to easily create a graphical interface for Java applications that will run on devices that use the JVM (Java Virtual Machine).
Great question.
Happy coding,
Ken
Peter Price
4,007 PointsThanks for the answer, but I have another question. What is a console based app?
Ken Alger
Treehouse TeacherConsole applications run strictly in the console.
You would have interaction similar to
Input your name:
Peter
Hello, Peter, I'm a console app.
If you start through the Treehouse Java courses they predominantly demonstrate console based applications instead of a Windows like user face or web based interface. It is my understanding that Java and web application courses are due in the near future here at Treehouse.
Ken
Ken Alger
Treehouse TeacherPeter;
I may perhaps be misunderstanding what you are attempting to accomplish when you ask about using Java in Windows Applications. One of the great things about Java is how cross-platform it is. It can be compiled and run on lots of different devices. Refrigerators, Raspberry Pi, Windows, Mac, Linux, Internet of Things devices, all can handle running Java.
Ultimately what are you attempting to accomplish with Java? You should be able to write it once and run it anywhere.
Ken
Peter Price
4,007 PointsThanks so much for your help.
Just one more question:
Would the user need anything installed on their laptop or PC?
Ken Alger
Treehouse TeacherPeter;
As with many things, it depends how you package your project. You can create an executable for it to run without additional software being required or you can require them to have the JVM installed. Lots of different ways to go about it, really depends on your application, target market, plus other considerations.
Hope it helps.
Ken
Peter Price
4,007 PointsI would like to write a program to manage and prioritize personal and/or work related tasks with buttons, text boxes and that sort of thing. I have done a lot of the Treehouse courses dealing with Android apps. But I wish to write an app that works on a windows computer in particular. Using Java because I know it best.
Ken Alger
Treehouse TeacherWork your way through the Java courses required for the JavaFX course then and the IDE course. You will get some experience with console apps in Java prior to JavaFX which will give you a good starting point beyond Android.
Best of luck and post updates on your project.
Ken
Peter Price
4,007 PointsThanks so much for your help Ken. I plan to get started soon (after I've finished my current Android course).
Peter