|
-
May 17th, 2002, 04:53 AM
#1
Thread Starter
Lively Member
Newbie wants to know....
Hi,
I know c and c++ fair enough. I would like to lean java.
Actually I have visual studio except java. So I downloaded sun java jdk from sun. but does not work to me properly, It might have been my mistake.
Can anyone please expalin me what I should do to write my first program in java? ..........
-
May 17th, 2002, 04:59 AM
#2
Lively Member
First of all, install the SDK 
The path to it shouldn't have any spaces.
Put your sdk\bin-folder in the path-variable.
Set the classpath-variable to .
If you haven't got a classpath, create it.
That should be all...
compiling:
javac JavaFile.java
running:
java JavaFile
The filename has to be the same as the class-name in the code.
-
May 17th, 2002, 05:25 AM
#3
Thread Starter
Lively Member
Thanks CreoN
I am following your instruction, let u know shorly
-
May 17th, 2002, 02:24 PM
#4
Dazed Member
You can also use the -classpath switch when running your programs if the directory where you are running your program differs from your CLASSPATH environment variable in the autoexec.bat. ie...... C:\ java -classpath C:\MyDirectory; MyProgram
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|