Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Java --> i don't understand
Closed Thread
Old 06-27-2005, 01:43 PM   #1 (permalink)
 
Junior Techie

Join Date: May 2005

Posts: 66

dingdong-man

Default Java --> i don't understand

i heard from my friend who are taking computer science degree that to make java programming, i only need to download the compiler, and make the command line of java from notepad, and save the file with the same name of the class name and put .java, and at last is placing the file in the same folder of the compiler....

i've done this all, but why it doesn't work... i think i haven't put the command to compile from the notepad, but how to do this...

and one thing, which one is the compiler...jre or jdk? but sure i download from sun.com
Thnx...
dingdong-man is offline  
Old 06-27-2005, 03:00 PM   #2 (permalink)
 
Monster Techie

Join Date: Jul 2003

Posts: 1,179

Emily is on a distinguished road

Send a message via AIM to Emily
Default

To compile a Java program, the file has to be saved ClassName.java, where ClassName is the name of the class in the file. In the command prompt change the directory to whatever directory your program is in. Type javac *.java (you can insert the name of the file or leave the wildcard and it will compile everything in the folder). Then to run the program, type java ClassName

To use the javac and java commands, you need to have downloaded the jdk from sun.com.

Hope this helped.
__________________
<a href=\"http://www.upstark.com\">www.upstark.com</a>
Emily is offline  
Old 06-28-2005, 12:19 AM   #3 (permalink)
 
Super Techie

Join Date: May 2005

Posts: 479

furtivefelon

Default

as your obviously very new to programming in general (or else you'd know to google simple questions..)

i'd recommend install the java sdk from sun.com and then download textpad at textpad.com, it's simple enough to understand after some reading in the help file.. it compiles, runs all .java files..

if you think u'd need more power, try eclipse from eclipse.org, i *think* the windows version includes a java sdk, but i'm not sure, as i used that only in linux..
__________________
lisp hacker
running: FreeBSD 5.4 - still learning
develop with: SBCL + emacs for lisp, Anjuta IDE +gcc for c, SPE for python..
browse with: opera
furtivefelon is offline  
Old 07-02-2005, 09:24 AM   #4 (permalink)
 
Junior Techie

Join Date: May 2005

Posts: 66

dingdong-man

Default

thnx...that's help....it works...hahaha... yea.... but this way is kinda wasting time....i'm trying to use JCreator...but it's too difficult... so i'm trying to use the one that using textpad. i've read the manual...after i click the configure button -->preferences-->tools,click add. and here's he problem... on the manual, it says the "Java SDK Command" should be selected from the drop down menu... but my textpad doesnt have any Java SDK command in that dropdown menu...
what should i do then....
whereas i could compile using the original way using that cmd....

thnx...
dingdong-man is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On