I just want to ask if you anyone here knows how to compile java file in linux specifically UBUNTU.
For example, I have a java file named Hello.java and saved at my desktop.
how do I compile and run this file using the terminal of ubuntu...
By the way, I am using the java built-in compiler of UBUNTU..
I hope you could help me with this one...
YOUR HELP IS HIGHLY APPRECIATED...
View the video tutorial at Compiling and Running Java program from command line.
1.Get the terminal first then create directry inside your home directry by typing the command: mkdir directryname. 2. After that go inside that folder and open PICO editor in your terminal. You can do it by just typing command: pico 3. Then copy and paste your java code onto that editor view.Then type command: CTRL-X.When you give that it will ask about saving the code save it as your program name.java.It will return you to usual terminal view. 4. Now you can enter the command for compiling the source code : javac your program name.java 5. After that you can run your program by the command: java your program name
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.