Results 1 to 4 of 4

Thread: Newbie wants to know....

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Posts
    96

    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? ..........

  2. #2
    Lively Member
    Join Date
    Mar 2001
    Location
    Sweden
    Posts
    115
    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Posts
    96
    Thanks CreoN

    I am following your instruction, let u know shorly

  4. #4
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    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
  •  



Click Here to Expand Forum to Full Width