Results 1 to 3 of 3
  1. #1
    UJJAL DHAR is offline Senior Member
    Join Date
    Apr 2010
    Location
    Dhaka,Bangladesh
    Posts
    180
    Rep Power
    0

    Default Facing problem in compiling user defined package

    I have created a package "Pack01" where class04 is created.

    when i tried to compile it shows that..

    ' javac'is not recognized in internal or external command.

    I wrote on comd.exe..
    C:\Program files\Java\jdk1.5\bin\Pack01\javac c:\Program files\Java\jdk1.5\bin\Pack01\class04.java


    Thanks in advance..:o

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Don't store your source files in folders under "Program Files".
    You can store your java source in any folder of your choice, so why not chose something like "My Documents/workspace/Java".
    Tou use the javac program from your command line, you need to have its path added to your System's PATH variable.
    So add the path "C:\Program files\Java\jdk1.5\bin\" to your PATH variable.
    You get to the path variable on Windows by right clicking My Computer->Properties->Advanced->Environment variables->System Variables

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,762
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by UJJAL DHAR View Post
    I have created a package "Pack01" where class04 is created.

    when i tried to compile it shows that..

    ' javac'is not recognized in internal or external command.

    I wrote on comd.exe..
    C:\Program files\Java\jdk1.5\bin\Pack01\javac c:\Program files\Java\jdk1.5\bin\Pack01\class04.java


    Thanks in advance..:o
    First set your PATH variable right to include the directory: "C:\Program files\Java\jdk1.5\bin\" (I don't know why you included that "Pack01" subdirectory. It's an OS thingy so check your operating system manuals. btw, there is no need to store your Java source files where your executable files are.

    kind regards,

    Jos

Similar Threads

  1. User Defined Method
    By overcranked in forum New To Java
    Replies: 6
    Last Post: 04-09-2010, 02:02 AM
  2. JSP with user-defined java classes
    By adammyth in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 03-05-2010, 07:13 PM
  3. compiling a package user created
    By svaidya in forum New To Java
    Replies: 8
    Last Post: 12-14-2009, 09:54 PM
  4. RegardingSgould Enter in user defined inbox
    By Prashant.surwade in forum CLDC and MIDP
    Replies: 0
    Last Post: 09-23-2009, 02:21 PM
  5. Replies: 0
    Last Post: 07-16-2007, 09:45 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
  •