Practicing programming, I see program execution in Eclipse, on what and how else can you test Java programs and applications? To clarify, when creating an application on Android, we can run it on a virtual device or on your phone, even if it is empty, without a user interface. But we will see the application icon, we can launch it. And how can you "see" Java? Is it just Eclipse? Or other options are possible such as: desktop, pop-up window, etc. In other words, what you need to "nakodit" in order to visualize the code. What functions and commands create an interface for communicating (or creating feedback) with the user?
1 answer
You are asking "how to use Java without Eclipse"? If yes, then it is not difficult:
- Create a text file with the
.java, for exampleHelloWorld.javaand write theHelloWorldclass in it containing thepublic static void main(String[] args)method. - At the command prompt, move to the folder with the
HelloWorld.javafile and execute thejavac HelloWorld.javacommand. - And then execute the
java -classpath . HelloWorldjava -classpath . HelloWorld. TheHelloWorldfile will appear - your compiled program that you can run.
Details can be found in this article , for example.
|