java lesson one trouble-plz help me

djmasith

Member
Aug 19, 2006
154
1
0
43
PND
this is not syntax or any error regarding ur code. u have to set he class path in to java\bin folder before run java command.

there are two methods.

1. in cmd type set classpath c:......(the path to the java\bin folder) then run the javac command

2. set environmental variables. right click on my computer and go to properties. select advance tab. click on environmental variables button. under system variables create a new variable name "path" (without double quot) and set the value as the path to java\bin ..

second method is recommended since it's a one time work. in the first method each time you are opening a cmd you have to set the path

have fun.
 

ccslk

Active member
  • Feb 13, 2007
    1,547
    2
    38
    djmasith said:
    this is not syntax or any error regarding ur code. u have to set he class path in to java\bin folder before run java command.

    there are two methods.

    1. in cmd type set classpath c:......(the path to the java\bin folder) then run the javac command

    2. set environmental variables. right click on my computer and go to properties. select advance tab. click on environmental variables button. under system variables create a new variable name "path" (without double quot) and set the value as the path to java\bin ..

    second method is recommended since it's a one time work. in the first method each time you are opening a cmd you have to set the path

    have fun.

    no machan mama ganata settings tikath haduwa.version check karama ekath ganata enawa.But compile karanna javac command eka dunnama oya error eka enawa?why?
     

    ashenrandika

    Junior member
  • Jan 14, 2007
    322
    0
    16
    SL, US
    ccslk said:
    when i wrote my first java programa(hello java) and going to compile it in dos prompt
    i got this error messege.
    can any one help me?



    machan umba jre eka witharai daala thiyenne
    jdk eka daala naha
    http://java.sun.com/javase/downloads/index.jsp
    site ekata gihin jdk eka download karala install karapan...
    eetapasse jdk folder eke bin folder eke path eka environment variables walata gihin set karanna...
    eetapasse command prompt eke nikamma javac kiyala gahala balanna:yes: :yes:
     

    djmasith

    Member
    Aug 19, 2006
    154
    1
    0
    43
    PND
    with the JRE you just can run java class. But cannot compile. Install JDK so that you will able to compile it. (Sorry I di not noticed it earlier.)
     

    pjayampathi

    Well-known member
  • Jan 20, 2008
    6,253
    39
    48
    Right click My computer
    Select Properties
    Click Advance Tab
    Click Enviorment Variables
    Under System Variables select "Path"
    Double click on that value and add this line..
    ;<your java bin folder>
    this must be in "jdk" floder not in "jre" folder..
    Click OK..
    Apply and OK..
    Now Try Again...
    Good Luck ...