where 2 place my .java file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahana
    New Member
    • Oct 2007
    • 12

    #1

    where 2 place my .java file

    Hello ,

    Presently for compiling a simple java prog i am placing my .java file in

    C:---->j2sdk1.4---->bin----->rahana----->my .java progs.

    but my friend was suggesting not to keep my .java progs in the above mentioned way,if i dont keep my .java progs in j2sdk1.4--bin ,then what is the other way in which i can place my .java files and compile.

    Thanking you
    Rahana
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by rahana
    Hello ,

    Presently for compiling a simple java prog i am placing my .java file in

    C:---->j2sdk1.4---->bin----->rahana----->my .java progs.

    but my friend was suggesting not to keep my .java progs in the above mentioned way,if i dont keep my .java progs in j2sdk1.4--bin ,then what is the other way in which i can place my .java files and compile.

    Thanking you
    Rahana
    Don't put your files in the Java bin directory (It works but it's kind of ugly). Just put them anywhere you want. Any of your documents folders for example.
    All that will be required then is to make sure that the Java bin directory's path is added to your system's PATH variable.

    Comment

    • MarkoKlacar
      Recognized Expert Contributor
      • Aug 2007
      • 296

      #3
      Hi,

      I recommend you download eclipse so you don't have to worry about anything.

      Cheers

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by MarkoKlacar
        Hi,

        I recommend you download eclipse so you don't have to worry about anything.

        Cheers
        Good advice, unless you are still learning the basics in which case I advise you to stay away form IDEs (only when you are still learning the basics though).
        While we are at giving good advices, throw away that jdk 1.4.XX, go to Sun's download page and get the latest JDK 1.6 and use that.

        Comment

        • rahana
          New Member
          • Oct 2007
          • 12

          #5
          Originally posted by r035198x
          Don't put your files in the Java bin directory (It works but it's kind of ugly). Just put them anywhere you want. Any of your documents folders for example.
          All that will be required then is to make sure that the Java bin directory's path is added to your system's PATH variable.

          Hello Sir,thankyou for looking in to my problem and giving answer but sir sorry to say I didn't get u,how can i add java's bin directory path to my System's path variable.

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by rahana
            Hello Sir,thankyou for looking in to my problem and giving answer but sir sorry to say I didn't get u,how can i add java's bin directory path to my System's path variable.
            I hope you've read all the replies posted in this thread so far.
            How to set the path variable depends on which OS you are using?
            So what OS are you using (you'll need to provide the version as well).

            When you post your OS version, also post the output when you run

            Code:
            java -version
            from a command promt/shell.

            Comment

            Working...