Page 1 of 2 12 LastLast
Results 1 to 20 of 32

Thread: javac

  1. #1
    PhilArmstrong is offline Member
    Join Date
    May 2008
    Posts
    10
    Rep Power
    0

    Default javac

    Hi,
    Sorry to be a pain, have done a search for this, but can't find anything I'm looking for, most replies just say put the bin directory in youe system vars

    I have installed JDK and I have put the bin file in the Path System Variable. But still when I try javac I get the not recognized as a blah blah...

    I can compile stuff if I save it in the bin directory but no where else.

    My Path variable says:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\; C:\Program Files\Java\jdk1.5.0_22\bin\;
    (have tried it with and without the final backslash!)

  2. #2
    gcampton Guest

    Default

    hmmm. this should work fine.

    are you using" javac filename.java " to compile

    and then to run program type" java filename " <---- no extension


    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\;C:\Program Files\Java\jdk1.5.0_22\bin

    make sure to delete spaces I'm not sure if this was a copy pasts error or if you have these spaces in the path. you had one in system32, (sy stem32) and one between ; and C:Pro...
    Last edited by gcampton; 11-11-2009 at 02:04 AM.

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

    Default

    Ya, that variables should work fine. I hope that the installation is in the specified location as your post. What happen when you just type javac on the console/command prompt?

  4. #4
    PhilArmstrong is offline Member
    Join Date
    May 2008
    Posts
    10
    Rep Power
    0

    Default

    its the right location of the files. when I type javac on its own I get the standard 'javac' is not recognized...

    if I just type java however, I get the full instructions on how to use it.

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

    Default

    Quote Originally Posted by PhilArmstrong View Post
    its the right location of the files. when I type javac on its own I get the standard 'javac' is not recognized...

    if I just type java however, I get the full instructions on how to use it.
    Are both javac.exe and java.exe stored in the same directory? Is there another path component that points to (another) java.exe? Type "java -version" and check if you have the correct version.

    kind regards,

    Jos

  6. #6
    gcampton Guest

    Default

    maybe you might want to try an updated JDK release version up to
    C:\Program Files\Java\jdk1.6.0_17
    at least that way a fresh install might clear things up

    http://java.sun.com/javase/downloads/index.jsp
    Java SE Development Kit (JDK)
    JDK 6 Update 17

    stable business release is still back at 1.4.2, but your using 1.5_22, seems strange if you just downloaded it.
    Last edited by gcampton; 11-11-2009 at 03:58 PM.

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

    Default

    Quote Originally Posted by gcampton View Post
    ...

    Stable business release is still back at 1.4.2,...
    ? ?

  8. #8
    gcampton Guest

    Default

    did you check out the page?

    Java for Business
    JRE or JDK 6, 5.0, or 1.4.2

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

    Default

    Not exactly what you said before.

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

    Default

    Up to date is much better in many cases. :)

    To original poster, did you try to compile a simple Java class on command prompt, by setting up the javac class path it self?

  11. #11
    gcampton Guest

    Default

    Quote Originally Posted by r035198x View Post
    Not exactly what you said before.
    Stable meaning long term support, what is confusing about that.

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

    Default

    Quote Originally Posted by gcampton View Post
    Stable meaning long term support, what is confusing about that.
    You should read the entire page; this is what it says:

    Java for Business v1.4.2 Access Only Offering
    Java Standard Edition version 1.4.2 reached its end of life in late 2008 which means security updates/fixes are no longer publicly available. However, customers who purchase the Java for Business v1.4.2 Access Only program will continue to receive security updates and critical fix updates until 2013!
    You have to pay for it (US$ 5000) while it is already past its EOL; not a nice alternative if you'd ask me ...

    kind regards,

    Jos

  13. #13
    gcampton Guest

    Default

    I wasn't posting the JFB as an alternative I added it at the end of comment, suggesting that while it's still back at 1.4.2 the OP was using 1.5.22, and the current release of JDK is 1.6.17

    1.5.22 is very far from either of those....

    snobbish behavior isn't needed, it's a very simple concept. 3 - 2 = 1

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

    Default

    Quote Originally Posted by gcampton View Post
    I wasn't posting the JFB as an alternative I added it at the end of comment, suggesting that while it's still back at 1.4.2 the OP was using 1.5.22, and the current release of JDK is 1.6.17

    1.5.22 is very far from either of those....

    snobbish behavior isn't needed, it's a very simple concept. 3 - 2 = 1
    You are not making much sense. The OP is not using JFB so adding a comment about it is useless.
    JFB is not still at 1.4.2 . The latest stable release is 1.6 and 1.4.2 has reached its end of life. It is only still supported because people paid to get it in the first place.

    The comment you made about it was both off topic and misleading. It gives the impression that the "stable business release is still back at 1.4.2" which is wrong. It's now at 1.6.

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

    Default

    Quote Originally Posted by gcampton View Post
    snobbish behavior isn't needed, it's a very simple concept. 3 - 2 = 1
    Yes and Java 1.4.2. is dead as a doornail; nothing snobbish about that. Don't spread misinformation please, the current Java version is 1.6 and unless you have to work with legacy implementations you should work with Java 1.6.

    kind regards,

    Jos

    ps. 1+1 = 2

  16. #16
    gcampton Guest

    Default

    well thanks for clarifying because it matters so much on a "new to java forum"....

    Seriously, I looked at the downloads page saw a long term release at 1.4, and suggested the OP download the latest release 1.6 because the releases on the download page are far from range of 1.5.22.

    I didn't bother looking closer at it because A: it doesn't interest me, and B: most intelligent people would look at what I said and understand that while I may not know 'exactly' what I am talking about, JFB is available from downloads page, and the downloads page states 1.4.

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

    Default

    Quote Originally Posted by gcampton View Post
    ..most intelligent people would look at what I said and understand that while I may not know 'exactly' what I am talking about, JFB is available from downloads page, and the downloads page states 1.4.
    Unfortunately many people use forums as their source of information therefore if someone doesn't know what they are talking about then its best for them not to say anything at all. If they do say something (as everyone is entitled to say whatever they want) then they should expect to be corrected by those who do know what they are talking about.

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

    Default

    Quote Originally Posted by gcampton View Post
    well thanks for clarifying because it matters so much on a "new to java forum"....
    Especially on a 'new to Java' forum it is important not to spread misinformation; newbies might get confused and learn the wrong things. Don't say anything if you don't know what you are saying, it obfuscates matters.

    Quote Originally Posted by gcampton View Post
    I didn't bother looking closer at it
    That is always incorrect ...

    kind regards,

    Jos

  19. #19
    gcampton Guest

    Default

    No problem I will not help anyone in future, I'll just link The Really Big Index to sound smarter.

  20. #20
    PhilArmstrong is offline Member
    Join Date
    May 2008
    Posts
    10
    Rep Power
    0

    Default

    java -version:

    java version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)


    javac -version:

    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    I uninstalled the 22 update and went to the 17 instead but still no luck.

Page 1 of 2 12 LastLast

Similar Threads

  1. Javac is not recognized?
    By Java idiot in forum New To Java
    Replies: 4
    Last Post: 08-03-2009, 07:54 PM
  2. excludes in javac target
    By ziggy in forum New To Java
    Replies: 2
    Last Post: 11-25-2008, 05:29 AM
  3. javac?
    By sardare in forum Eclipse
    Replies: 1
    Last Post: 06-14-2008, 03:06 AM
  4. javac DOS
    By rdunne in forum New To Java
    Replies: 3
    Last Post: 01-01-2008, 12:49 PM
  5. Help with javaC
    By Daniel in forum New To Java
    Replies: 2
    Last Post: 07-04-2007, 03:44 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
  •