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



Home Answers Viewqa Java-Beginners compile and run java program

Have Programming Question? Ask it here!
 
 
 


Suneeta
compile and run java program
2 Answer(s)      3 years and 8 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
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
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
compile
compile  how to compile .class files using eclipse
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
how to run java program that has several classes under package from usb drive?
how to run java program that has several classes under package from usb drive... package. I have to use following line on command line to compile and run my program... command line and it works. I copied all java files and class files to flash drive
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.
best os to run java
best os to run java  which is best os to run java program
Java compile time error. - Java Beginners
Java compile time error.  CreateProcess error=2, The system cannot..., Please specify in detail and send me code. If you are new java... : http://www.roseindia.net/java/master-java/index.shtml Thanks & Regards
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
how to run jdbc program in linux-ubuntu?
how to run jdbc program in linux-ubuntu?   how to run jdbc program in linux-ubuntu
Java run time polymorphism
Java run time polymorphism  What is run-time polymorphism or dynamic method dispatch
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
how to run jdbc in jsp program - JSP-Servlet
how to run jdbc in jsp program  i want to use sql server 2005 in jsp program to store data.i know how to run simple program but this program i tried my best i am not able to do so.please give me the answer of this as soon
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 packge program - Java Beginners
java packge program  my question is how to compile and run java package program in the linux OS
run command prompt from jsp program
run command prompt from jsp program  Hi.... Is it possible to run a command prompt from jsp? If possible please help me with some code... Thanks & Regards vanchinathan.R
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
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
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
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
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
Java Thread : run() method
Java Thread : run() method In this section we are going to describe run() method with example in java thread. Thread run() : All the execution code is written with in the run() method. This method is part of the Runnable interface
New to JSP..need help to make & run a JSP program.
New to JSP..need help to make & run a JSP program.  Hi, I have installed Tomcat 5.5 on my system. Plz help me to make a simple JSP program. And also how to run it.   Hi Friend, Have you set the classpath? Anyways
doesnt run again - Java Beginners
doesnt run again  the code u sent doesnt run and the error msg says illegal start with do even if i change it it keeps telling me the same... the soltion   Hi I am sending u again the code, this code run in my
 

 

 

DMCA.com