Java Beginner

A Member? Please Login  
type your username and password to login
Date: December 05, 2008, 01:13 PM
268445 members and 165504 Topics
Latest Member: IROTTAKMARM
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming (Moderator: Dual Core)  |  Java Beginner
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: Java Beginner  (Read 341 views)
technobayo (m)
Java Beginner
« on: August 19, 2008, 07:04 AM »

Hello,
While i'm not new to the world of programming given my sound knowledge of Vb6 and .Net 2005, i'm a complete novice to Java. I'll be commencing its classes soon but i'm having problems getting acquainted to how it works as i intend to work with what i already have. Presently, i've got a couple of e-books plus a s/ware called netBeans and the Java compiler .
My major dilema is knowing how codes are written and interpreted/compiled in Java even though programming languages bear some similarities with respect to the use of Variables, Loops n so on. I'd like answers to the following:
1. What's the main GUI used for writing d source codes in Java?
2. Are there menu like options for controls and oblects as alternatives to the codes as obtains in Visual studio?
3. Besides, is NetBeans the main s/ware to use or just an arm of Java itself?
4. What are the requirements proper in terms of s/wares?
A-40 (m)
Re: Java Beginner
« #1 on: August 19, 2008, 07:20 PM »

1:Why not start with your good old notepad

2:Yeah if you are using JBuilder its got lots of drag and drop options

3:Its not the main software its just an arm of Java its pretty new in the market and its advisable you learn your fundamentals before dabbling into Netbeans

4:Since you are a beginner get a jdk1.6.0 and start coding
technobayo (m)
Re: Java Beginner
« #2 on: August 19, 2008, 08:02 PM »

Yeah, i already hav d compiler but aw do i execute d code after typing in WordPad?
ilosiwaju
Re: Java Beginner
« #3 on: August 20, 2008, 06:27 PM »

well, after typing your source code u need to carefully do the following things.

1. open the folder where u installed your jdk(the java compiler).
2. locate a folder called "bin"
this is the folder that contains files needed to compile and run your codes(and other things u'll learn later)take a look at the files "javac" and "java" just look,don't attempt to open them.

for ease of location,create a project folder(name it tech for example, directly on your c-drive(this is where u save your java files you typed in notepad)

go to your dos prompt(windows key+R, then type cmd, u'll see a boring black screen).
type the following:
"cd\tech" press enter
"path=c:\nameofthejavainstallationfolder\bin" press enter
to know whether u did it right,
type "java" press enter,  u should get a screen of java stuffs(don't worry about them for now)
once u see that,u are ready to go.
type in::
"javac YourJavaFile.java" press enter
u should see your errors now, this is the stage called compilation.-javac means javaCompile
if there are errors,ho back to notepad,debug,save the changes and recompile again until it shows no errors


after that, just  type:
"java YourJavaFile" don't put .java

that will give u your program.
keep me posted or sms 08028838810, ready to assist
A-40 (m)
Re: Java Beginner
« #4 on: August 21, 2008, 01:42 PM »

@ilosiwaju
Yeah thanks for giving the dude the steps on compilation
technobayo (m)
Re: Java Beginner
« #5 on: August 21, 2008, 06:59 PM »

Wow peops, couldn't be any happier. Off to a good start now, thanx in no small details 2 ur assistance. I'll keep in touch, God bless!
javarules (m)
Re: Java Beginner
« #6 on: August 22, 2008, 02:00 AM »

Well that info is cool, but he will have to set the path all the time he opens his command line. if he close it, blam his path has gone. also he wont be able to run any other command on the command line apart from the commands in java/bin. why not make life easier, add the path to the environment variables, so u don't have to do that everytime, Its been long since I do any windows but I think some guys here can help out, or better still visit http://naijadukes.com thats a purely java forum.

My other solution is create a batch file and place it in your windows/system32 folder(I hope windows still uses system32  Embarrassed   ). Creating a batch file is also easy

1. start notepad
2 Type the following commands

c:\pathtojavabindir\javac

NOTE: That if your path is in program files like C:\Program Files\ you might consider typing

c:\Progra~1\java\,  instead. I don't know if later windows have resolved that problem but to be on the safe side, just use Progra~1 instead of Program Files

3. save the file as javac.bat (make sure u select "all files" somewhere in Notepad save dialog).

now as u power on ur command line,  to compile just type javac yourfilename.java

Now to run the file, type java yourfilename (without the extension). Mordern jdk's already put java in your path

But if peradventure you get and error message that java is not recognised or something like that, just repeat the steps above, replacing javac with java

chikena

ciao
technobayo (m)
Re: Java Beginner
« #7 on: August 26, 2008, 07:19 AM »

Thanx bro!
Been trying 2 access the new java forum 2 no avail. Know what d problem is?
Bassie (m)
Re: Java Beginner
« #8 on: August 27, 2008, 06:51 AM »

www. should help - a forum dedicated to Java techs!
 J A V A   How Can I Get It To Work On Linux  Java Vs C Sharp  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 
Google
 
Web www.nairaland.com
Sections: TV/Movies (2) Music/Radio (2) Celebrities Job Talk Jobs/Vacancies (2) Career Talk Romance Books Politics Sports Fashion Travel
Health Schooling Religion General(2) Business Webmaster Programming Computers Phones Cars & Trucks

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.