Hello, everyone!!!

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...

javac then java?

cd /home
unset CLASSPATH
javac Hello.java
java Hello
Better to save file in your own directory

In Unix/Linux/DOS windows the commands for compiling and runing java program are the same provided the environmental variable is set up properly.
javac Hello.java
java Hello
If you develop an applet application, you may use
appletviewer Hello.html
to open the html file Hello.html to run the applet.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.