Results 1 to 5 of 5
- 12-11-2008, 03:17 PM #1
Member
- Join Date
- Dec 2008
- Posts
- 2
- Rep Power
- 0
Real Newbie Question - I'm sure its dumb
Okay I started out with Head First Java this week.
I read a bit into it and tried the standard "Hello World" program
I've installed the JDK v .11 and its working fine running from comand prompt
so I tried this
in a file called greetings.javaPHP Code:public class greetings { public static void main() { System.out.print("hellO"); } }
I go into dos and type
javac greetings.java
if I dont get errors I get nothing, not even "hello"
- 12-11-2008, 03:34 PM #2
need the second part...
If you didn't get any errors, that's good. What you did with the javac command is just compile your code. This will have produced another file named "greetings.class". Now you have to run the class file with the following command:
Luck,Java Code:java greetings
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 12-11-2008, 03:47 PM #3
Member
- Join Date
- Dec 2008
- Posts
- 2
- Rep Power
- 0
Awesome that worked!
Guess that serves me right for skipping ahead in the book.
Coming out of PHP which tends to do everything for you certainly will be interesting. Thanks
- 12-11-2008, 03:49 PM #4
Welcome
You're welcome.
Chris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
-
Similar Threads
-
OpenGl transformation question newbie
By ankitmcgill in forum New To JavaReplies: 1Last Post: 11-16-2008, 03:46 AM -
A newbie question: How do I take a J2ME open source and create a project
By Anona in forum CLDC and MIDPReplies: 0Last Post: 09-28-2008, 11:02 AM -
Newbie search array question
By CirKuT in forum New To JavaReplies: 19Last Post: 09-14-2008, 06:26 AM -
Newbie question; Vectors
By Kern in forum New To JavaReplies: 7Last Post: 08-03-2008, 06:59 AM -
Newbie question about Static methods
By SCS17 in forum New To JavaReplies: 9Last Post: 02-06-2008, 08:03 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks