Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,152 members, 7,818,474 topics. Date: Sunday, 05 May 2024 at 04:49 PM

Compiling A Java Program - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Compiling A Java Program (1018 Views)

Java Program To Solve Quadratic Equation-dealwap / Using AJAX For Server Side Compiling / Import Dll Into Java Program (2) (3) (4)

(1) (Reply) (Go Down)

Compiling A Java Program by segebee(m): 6:25pm On Aug 11, 2007
i installed java sdk 1.3 or so in my system but im finding it difficult to compile

guess ma question is how to compile and an example prob. simple program eg hello world
Re: Compiling A Java Program by my2cents(m): 3:33am On Aug 12, 2007
u probably hvnt set your class path properly/at all. To answer your other question:

public static void main(String args[]) {
System.out.println("Hello World"wink;
}

Put this in your text editor and save it as ".java", then:

open a dos prompt (if using windows), navigate to where you have the file and type "javac [filename].java", then assuming you don't get any compilation errors, the [filename].java gets converted to a class, so at that point:

type this next - "java [filename]", and you shd see "Hello World" printed in the dos prompt.

I hope this helps.
Re: Compiling A Java Program by mimohmi(m): 12:31pm On Aug 17, 2007
@ segebee


Welcome to the world of Java. Check this link. It will help
http://www.javaden..com
Re: Compiling A Java Program by A40(m): 12:45pm On Aug 20, 2007
Java too get wahala
Re: Compiling A Java Program by segebee(m): 8:47pm On Aug 20, 2007
thanks 2cents i'll try that
how do i set class path

thot d string args stuff was a template as in oracle

i'll try it bt did i mention that it saya javac is not a recognised program?

thanks all who responded
Re: Compiling A Java Program by maxjax(m): 12:17pm On Aug 21, 2007
java is da bomb ! guys where can i get "DUMPS" for java ?
Re: Compiling A Java Program by segebee(m): 8:37pm On Sep 08, 2007
thanks, i actually found out that the string was supposed to start wt uppercase ie String

now i can say welcome to java

pls sample codes or resources is accepted
Re: Compiling A Java Program by mimohmi(m): 6:19pm On Sep 12, 2007

@segebee

Ok, you can check this link for more details and examples


https://www.nairaland.com/nigeria/topic-8060.0.html

Hope it will help you.

Re: Compiling A Java Program by gacheezo(m): 7:06pm On Sep 12, 2007
my guy the reason why your jdk seems not to be working after installing it is because you ve not set the path , i'll advise you uninstall and when reinstalling, install in install in your c:\ directory and name it something like C:\jdk1.3 depending on the version of the jdk

(1) (Reply)

Vb.net Database Con Help / Mediocrity As A Result Of Not Understanding Programming Concepts / Edtech

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.