edit page

Creating Console App Using Java one of the standard Gui's

To get your simple hello world running, make sure you follow the java programming (env't) rules, and place your program files w/ main method all into one folder.

Next you can compile the program and issue the "% java ProgramName" command using ProgramName.class -class as your option to be passed in.

I have tried to remain aware of how this works but need to refer back to my notes sometimes.

However, also in expanding, I thought I'd add that interacting in the BlueJ/Greenfoot, Netbeans/Eclipse (GUIs) environments isn't so much more difficult.

In my example, we can follow the basics on setting up this three-file rectangle program from Oracle's site. Coincidentally, it's a 3-step process:
  1. I copied the class files into a project in BlueJ and compiled there first. (image)

  2. Then I opened my command and typed the "java program" command and was shown the following. (image)

  3. Just as easily, I was able to import the bluej project into eclipse, navigate to the CreateRectangleObject class in the package explorer and run as java application. (image)
With a little time and energy you'll be able to do the same in no time and be on your way..Step 2 is creating a JAR file from the project, so you can run it easily.

If you're wondering about the example using Netbeans, find that here on Oracle.

Need to just get the Java API documentation?