This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath problem

 
Gina Pandher
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Can anyone tell me how to set my classpath so i can compile my source code whether it is saved in the bin or anywhere on my hard drive. I have been saving all my .java files in the bin directory and then on the c prompt i have been using
c:\jdk1.2.2\bin>javac MyFile.java
to compile my code. I want to be able to save my source file elsewhere and run the javac without going to the bin everytime.
Please help !
 
Noah Carroll
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gina,
The classpath is not what allows you compile programs from any directory. You need to set your path. The best way to do this is to run sysedit and open your autoexec.bat file and add c:\jdk1.2.2\bin to the end of the path line. Do not delete the original path, only add that line.

I hope this helps

Noah Carroll noahcaroll@juno.com
 
Carl Trusiak
Sheriff
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps the Installation instructions can help it covers setting your path and classpath plus a real good explaination of what classpath means and how java uses it.
Hope this helps
 
Gina Pandher
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Noah Carroll:
Gina,
The classpath is not what allows you compile programs from any directory. You need to set your path. The best way to do this is to run sysedit and open your autoexec.bat file and add c:\jdk1.2.2\bin to the end of the path line. Do not delete the original path, only add that line.
I hope this helps
Noah Carroll noahcarroll@juno.com

When i run autoexec.bat this is what i get
SET BLASTER=A240 I5 D1 T4
LH C:\WINDOWS\AU30DOS.COM
@ECHO OFF
rem
rem *** DO NOT EDIT THIS FILE! ***
rem
rem This file was created by the System Configuration Utility as
rem a placeholder for your AUTOEXEC.BAT file. Your actual
rem AUTOEXEC.BAT file has been saved under the name AUTOEXEC.TSH.
rem

SO I OPENED AUTOEXEC.TSH AND THIS IS WHAT I GOT......I DONT SEE THE WORD "PATH" ANYWHERE
@C:\PROGRA~1\NORTON~1\NAVDX.EXE /Startup
SET BLASTER=A240 I5 D1 T4
LH C:\WINDOWS\AU30DOS.COM
@ECHO OFF
REM [Header]
REM [CD-ROM Drive]
REM C:\WINDOWS\COMMAND\MSCDEX /D:MSCD001
REM [Miscellaneous]
REM [Display]
mode con codepage prepare=((850) c:\windows\COMMAND\ega.cpi)
mode con codepage select=850
CAN YOU OFFER ANY MORE SUGGESTIONS???

 
Steven YaegerII
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the link that got me out of it awhile back:
http://www.naviseek.com/users/rcade/books/java2412/jdkhelp6.shtml
...it is probally wise to save a copy of your original AUTOEXEC.BAT file.
[This message has been edited by Steven YaegerII (edited September 21, 2000).]
 
Gina Pandher
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you much for all the useful information !
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic