Home Answers Viewqa Java-Beginners compile and run java program

 
 


Suneeta
compile and run java program
2 Answer(s)      2 years and 6 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...

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 Pages:
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
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 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 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 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
compile error
program with Test.java and try to compile with javac test.java an error like...compile error  Hello All for example public class..."); } } i have save this program with A.java. Then I executed this program javac A.java
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
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
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
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 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 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
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
Compile time error
Compile time error  Hi, When i compile my simple program in cmd am... command, operable program or batch file" How to resolve this problem ????   This means java is not configured properly in your system. Please visit
Unable to compile Servlet
JAVA_HOME with the value C:\Program Files\Java\jdk1.6.0.14 Then I created... was created by me. To compile my servlet program I did the following: C:\apache...Unable to compile Servlet  First I installed the tomcat server in C
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
how to run servlet - JSP-Servlet
how to run servlet  pls give me comlete procedure to run the servlet on apache-tomcat 6.0.16 how can i set my classpath, java_home etc. also where i have to save my servlet program and how it compile and then run on web browser
How to compile & get output for JSP
How to compile & get output for JSP  HI My Roseindia friend has given the answer as RUN the JSP How to run the JSP Program? But what i mean is that i created a small jsp program in HTML and saved as Hello.jsp. And next i opened
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 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
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 Jdbc program can be run??
created successfully and when i compiled this program then it compiled successfully ,but when i run it ,it gives following error-> C:\Program Files\Java...How Jdbc program can be run??  import java.sql.*; import java.util.
not able to run in gcj file - JDBC
not able to run in gcj file   We have a java program in Linux... to run the java program it says that Classes12.Jar?s oracle Driver missing. We... the GCJ compiled Java Program. ?./Test? When we tried the same program
java run time error - Java Beginners
java run time error  when i compile my program it didnt show any error in my program.but i cant run my program, if i run my program means..." java.lang.ArrayIndexOutOfBoundsException: 0 at Armstrong.main(Armstrong.java:22) Java Result: 1
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 servlet
; Variable Value:  C:\Program Files\Java\Tomcat 6.0\lib\servlet... structure.  Compile the java source file, put the compiled file (.class... How to Run a Servlet      
best os to run java
best os to run java  which is best os to run java program
How to run program in new opened cmd
How to run program in new opened cmd  Hello i have made a program in java to open command prompt, then how to run my left of the program in the new opened command prompt
java pages run
java pages run  how do we run jsp file in the browser. do we need to install server. could it be run on the xamp server   You need Apache Tomcat Server to run the jsp code over it. Follow these steps to run the simple
java packge program - Java Beginners
java packge program  my question is how to compile and run java package program in the linux OS
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
run a java application - Java Beginners
run a java application  Hai Deepak, I ve set my environment...; CLASSPATH= C:\Program Files\Apache Tomcat 4.0\common\lib\servlet.jar; JAVA_HOME=C:\Program Files\Java; path=C:\Program Files\Java\jdk1.6.0_06\bin; My
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
run time error
run time error  my program compile successfully but does not showing output for any program ...   Post your code.   public class...("Hello, World!"); } } // This is simple program but after successful compiles
run ttime error - Java Beginners
run ttime error  how to compile a client server application using RMI ?  Hi friend, I am sending you a link. This link will help you. Please visit for more information. http://www.roseindia.net/tutorials/rmi/rmi
How to download, compile and test the tutorials using ant.
will compile the java files and create struts2tutorial.jar and place in the lib... and run Struts 2.1.8 examples discussed here. You will have to install ant build tool to compile the examples. You can go to the command prompt and type
How to run a simple jsp page in tomcat???
How to run a simple jsp page in tomcat???  i am trying to run... org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 22 in the generated java file The method
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 compile programs??????????
how to compile programs??????????  "javac" is not recognised as a file name. why??????????   Have you set your path name and class name correctly? Anyways have a look at the following link: Install Java
how to run applet - Applet
how to run applet   Hi everybody i am using connecting jdbc in applet program. this is executed successfully with appletviewer command >...://www.roseindia.net/java/example/java/applet/ http://www.roseindia.net/java
compile time error
compile time error  my program compile successfully and make the class file also but when i tried to do next command to see the output,it showing error that "could not find or load main class fibbo" fibbo is my class name
compile time error
compile time error  my program compile successfully and make the class file also but when i tried to do next command to see the output,it showing error that "could not find or load main class fibbo" fibbo is my class name
compile time error
compile time error  my program compile successfully and make the class file also but when i tried to do next command to see the output,it showing error that "could not find or load main class fibbo" fibbo is my class name
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
Download and Install Java
;    To compile and run a java... is the basic set of tools required to compile and run java programs..., compile and run java programs
java run time error - JDBC
java run time error  when i m running for batch execution program in jdbc i m facing this kind of runtime error as Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap ter could not establish
Hello world (First java program)
Hello world (First java program)   ... to develop the robust application. Java application program is platform independent and can be run on any operating System. Writing Hello World program is very

Ask Questions?

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.