Results 1 to 3 of 3
  1. #1
    osval is offline Member
    Join Date
    Jul 2007
    Posts
    26
    Rep Power
    0

    Default problem when I try to compile a program from command prompt

    I'm trying to compile java program from command prompt.
    It gives javac is reserved word.
    I'm using C:\java\j2re1.4.1_02.I already set the classpath to bin folder

    what's happening?

  2. #2
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Posts
    135
    Rep Power
    0

    Default

    What are you typing into the prompt when you get that message.

  3. #3
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

    Default

    Do you use word 'javac' in your source code? If you do, change it to other word.

    Also, set the classpath on the command line:

    javac -classpath . filename.java

    '.' means your current working directory.

Similar Threads

  1. accessing command prompt using java (netbeans)...
    By kureikougaiji in forum New To Java
    Replies: 6
    Last Post: 06-27-2008, 03:01 PM
  2. simple problem - code wont compile
    By dirtycash in forum New To Java
    Replies: 1
    Last Post: 11-20-2007, 05:49 PM
  3. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 12:23 AM
  4. launch a desktop icon program command
    By avaj987 in forum New To Java
    Replies: 3
    Last Post: 08-03-2007, 11:40 AM
  5. Compile a program
    By toby in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 09:09 AM

Posting Permissions

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