• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting javac to work in Win NT, setting the path and things

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy Folks,
I did this long ago but I forgot.
I just installed jd1.2.2 on Win NT.
at the command prompt c:\>java works fine.
But c:\>javac does not.
I have set the System Path Variables in the Environment Settings.
I created a new variable called Classpath and set it.
But to no avail.
Could anyone help me with this.
Thank you very much
Bill
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,
You don't need a classpath for compiling java code. The important environment variable is PATH. Make sure you supply the bin directory where you have installed jdk1.2.2.
Java executables in:
C:\jdk1.2.2
Path should include:
c:\jdk1.2.2\bin
Manfred.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I tried that, but it still does not work.
I pointed to the correct jdk bin.
;(
Bill
 
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you can execute java, then you should be able to execute javac, because they are both in the jdk1.2.2\bin directory. If you type javac, do you see the following?


Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-O Optimize; may hinder debugging or enlarge class file
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-target <release> Generate class files for specific VM version


If yes, then your path is fine.
-Peter
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Peter,
Its not quite so.
Thanks
Bill

Originally posted by Peter Tran:
If you can execute java, then you should be able to execute javac, because they are both in the jdk1.2.2\bin directory. If you type javac, do you see the following?
If yes, then your path is fine.
-Peter


 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Buff,
Can you show us your directory structure for the SDK, and show us waht you have now for your path and classpath.
Also if you still have an old version of java loaded that could cause problems.
Try reading this: http://www.javaranch.com/ubb/Forum33/HTML/001304.html
***********************************************************

PS, we really want to get to know you as YOU. See the JavaRanch post you made.
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Buffalo Bill,
Your name does not comply with the Javaranch naming guidelines which can be found at http://www.javaranch.com/name.jsp
In particular


Do not use cute names like "Justin Case" or "Adam Baum". Do not use the names of celebrities.


please register again with a valid name.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cindy,
Thank you for the infomation
I will register.
Thanks
Bill

Originally posted by Randall Twede:
Buffalo Bill,
Your name does not comply with the Javaranch naming guidelines which can be found at http://www.javaranch.com/name.jsp
In particular


Do not use cute names like "Justin Case" or "Adam Baum". Do not use the names of celebrities.


please register again with a valid name.


 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Buffalo Bill = Stephen Lawson
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Stephen,
So nice to meet the REAL you!!!
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stephen,
Are you still having problems with your path? Since you specified that you are working on WinNT, I will show you the way you need to set up your environment variables on that platform.

  1. Go to Start > Settings > Control Panel.

  2. Click on System icon.

  3. Go to the Environment tab.

  4. [list]In the Variable text box enter this text:

    [/list][list]In the Value text box enter this text:

    (If the path to your java.exe and javac.exe files are different, you need to put that directory instead. To check for the right directory, go to Start > Find > Files or Folders... and look for javac.exe)
    [/list]
  5. Press the Set button.

  6. [list]Now enter this text in the Variable text box:

    [/list][list]Now enter the directory your java programs will be in in the Value text box, something like:

    [/list]
  7. Press the Set button again.

  8. Press the Apply button and close the System Properties and Control Panel windows.


  9. Your path and classpath should now be set, and you should be able to compile and run Java programs!
    (Another problem that may crop up concerns older JDK versions. If you had an older JDK installed, you will need to delete your current JDK completely before you install a newer version.)
    HTH,
    -Nate
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since all .java files are aleways saved in "bin" folder in "jdk1.3".you first goto that particular path and then proceed.
C:\>cd jdk1.3
c:\jdk1.3>cd bin
c:\jdk1.2\bin>
now proceed.
NOTE:All .java files are compiled to .class files only in"bin" folder , where all inbuilt classes are saved in kit.
 
Stephen, Lawson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Guys,
Thanks Cindy, Thanks Nathan and Thank you Vivekanada.
Stephen Leacock Lawson
 
My pie came with a little toothpic holding up this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic