Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners compile and run java program
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Suneeta
compile and run java program
2 Answer(s)      4 years and 2 months ago
Posted in : Java Beginners


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


Advertisement
View Answers

March 11, 2013 at 2:04 PM


Hi,

View the video tutorial at Compiling and Running Java program from command line.

Thanks



March 10, 2012 at 9:11 PM


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



Related Tutorials/Questions & Answers:
compile and run java program
compile and run java program  Hello, everyone!!! I just want to ask if you anyone here knows how to compile java file in linux specifically UBUNTU... do I compile and run this file using the terminal of ubuntu... By the way, I am
How to compile and run Java program
How to compile and run Java program  How to compile and Java program..., For compiling and running the Java program from command prompt you should must have JDK... tutorial Compiling and Running Java program from command line. If Java
Advertisements
how to compile and run servlet program
how to compile and run servlet program   hello sir/mam i hve installed tomcat5.5 version and also have jdk1.6.0_14 installed but not able to run it or compile i m doing it first tyme pls help me in sorting out this problem. i hve
How to Develop, Compile & Run a rmi Program in NetBeans 6.9.1 ide?
How to Develop, Compile & Run a rmi Program in NetBeans 6.9.1 ide?  how to develop, compile & run a rmi program in netbeans 6.9.1 ide? will you please give me a step by step (practical) explaination? Thanks in advance
How to compile and run the JSP
How to compile and run the JSP  Hi Kindly tell me how to run and compile JSP small Program using Tomcat as webserver. I created small program HELLO JSP in HTML and compile the program but it is saying Class o r interface
Example to compile a java file with the help of the program
Example to compile a java file with the help of the program... are describing you the way to compile the java file with the help of the java program. The steps involved for compiling the java file from the program are described
how to run java program
how to run java program  i have jar file. in jar i have so many classes.in one of file i want modify .after modifying file i want replce in jar. please help me to how to generate class and how to replace
java program run on thml page?
java program run on thml page?  how to run java program on html page using text area
how to compile and run struts application - Struts
how to compile and run struts application  how to compile and run struts program(ex :actionform,actionclass) from command line or in editplus 3
how to run a java program using run.exec()?
how to run a java program using run.exec()?  Hi..i want to compile and run a java file using run.exec().i.e., without compiling and running from command prompt i want to do them in the program itself.I am able to compile
why java program not run with msword editor
why java program not run with msword editor  if java program write in MICROSOFT WORD then why they are not run with jdk
How to Run First Java Bean Program ?
How to Run First Java Bean Program ?  Hi My Dear Friend I can run many Java Programs Like, Applet,Swing,RMI ,Socket Programming and Java Servlet too But Now I need that How to run Java Bean Now I have BDK1.1 But still don't
How to run a Java program in CMD
There are multiple ways to write and run Java programs. In this article we discussed how to write and run Java program in CMD. Tips to run Java program... it should compile the file.  Now time to execute the program. Run
how to run this program?
how to run this program?  how to run java swing program   Java Swing program runs same as a simple java program. There is no difference... with javac and run with java command, same as a simple java program. Learn Swing
compile a java class
compile a java class  Hi, Am having a class ExampleOne.java in the location C:\learn\ExampleOne.java I want the class file to be present in C:\. I don't want to add any package details in the code. Is is possible to get
compile a java class
compile a java class  Hi, Am having a class ExampleOne.java in the location C:\learn\ExampleOne.java I want the class file to be present in C:\. I don't want to add any package details in the code. Is is possible to get
JAVA Compile Question ?
JAVA Compile Question ?  I'm unable to compile this file and not sure why? Can someone please help? import java.nio.file.*; import java.nio.file.attribute.*; import java.nio.file.attribute.Attributes; import
Compile error - Java Beginners
Compile error  I get this error when compiling my program: java:167: unreported exception java.lang.Exception; must be caught or declared.... Thanks  Hi friend, Do some changes in the code then compile Successfully
how to run rmi program
how to run rmi program  how to run rmi program
compile this program and let me know the resolution
compile this program and let me know the resolution  class Maxof2...+" is greater than "+i); } } please compile and let me know the resolution  ... arguments like this: java Maxof2 4 5 The code take these values and check
servlet not compile - Java Beginners
servlet not compile  Hi friend, I am Using JDK 5.0 with that javax.servlet is not available so i download this package and put it in the src folder,but my program displayed "package not found" at the time of compilation
Java compile error - Java Beginners
Java compile error  I am having trouble compiling the Java project available on this site at http://www.roseindia.net/chatserver/index.shtml... to compile Java on Mac besides using the Terminal
how to run - Java Beginners
how to run   how to run java program... brifely  Hi... the "javac" command to compile the program and after compiling,uses "java" command to execute or run the program. For ex, If you have the following java program
compile
compile  how to compile .class files using eclipse
java not run on my pc
java not run on my pc  i have installed java in pc but when i run and compile any program the massage is display that 'javac' is not recognized as an internal or external command
i got an error while compile this program manually.
i got an error while compile this program manually.  import javax.servlet.http.*; import org.apache.struts.action.*; public class ActionOne{ public ActionForward execute(ActionMapping mapping
couldnt run this program
couldnt run this program  package calculator; import java.util.Scanner; public class calculator{ public static void main(String args[]){ Scanner vin = new Scanner(System.in); Double firstnum,secondnum,sum,sub,mul
First Java Program
://www.roseindia.net/java/master-java/helloworld.shtml Compile and Test the Program Java provides javac compiler to compile the Java program. To compile your HelloWorld... HelloWorld.java Learn how to compile and run Java File at http://www.roseindia.net
how to run jdbc program in linux-ubuntu?
to compile java program javac prog.java java prog...how to run jdbc program in linux-ubuntu?  how to run jdbc program in linux-ubuntu?   hi firstly download the jdk on your system using
How to Program in Java
of testing the Java program. Here it will run on the JVM. To run the java...This tutorial tells you how to program in Java? As a beginner you must know... is also used to create enterprise web applications also. To program in Java you
Download and Install Java
;    To compile and run a java... is the basic set of tools required to compile and run java programs... : Now you can create, compile and run java programs. Back to Learn Java
 

 

 

DMCA.com