Results 1 to 2 of 2
  1. #1
    waelhelbawi is offline Member
    Join Date
    May 2008
    Posts
    1
    Rep Power
    0

    Default Trouble compiling code

    Hey guys,

    I began learning Java a few days ago and until now its been a blast. At first, I tried writing my code using notepad and then compiling it using the command prompt in windows. Unfortunately, this method gave me errors. Because of this, I switched to an IDE (integrated development environment) named Eclipse. The application is awesome but I still prefer to learn how to compile using the old-fashion way ;)
    Can anyone tell me the proper steps to compiling my code using the command prompt?

    P.S.: I've already downloaded the JDK Update 6.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    You have to set the class path for working folder. Otherwise you can't compile it.

    Here is the simple way to do it.

    Say your working folder is D:\JavaTest and the JDK installation folder is C:\Java\jdk1.6.0_05

    Open the command prompt and change the working path to D:\JavaTest Then type this,

    Java Code:
    D:\JavaTest\>path=c:\Java\jdk1.6.0_05\bin\
    Then type javac there. You get the possible options with Java, if you do it correctly.

    But in this way, each time you start work on Java, have to repeat. If you how to change the AUTOEXEC.BAT file, no need to repeat this.

Similar Threads

  1. compiling trouble
    By capacitator in forum CLDC and MIDP
    Replies: 4
    Last Post: 06-10-2008, 10:12 PM
  2. Compile Trouble
    By adelgado0723 in forum New To Java
    Replies: 5
    Last Post: 04-21-2008, 02:02 AM
  3. Compiling and running code in runtime
    By tim in forum New To Java
    Replies: 4
    Last Post: 01-27-2008, 06:58 PM
  4. Having trouble with array
    By ice22 in forum New To Java
    Replies: 3
    Last Post: 11-13-2007, 03:06 AM
  5. JTree trouble
    By Alantie Vala in forum AWT / Swing
    Replies: 3
    Last Post: 07-31-2007, 11:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •