• 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

Can't configure classpath for OOP-1

 
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, OK, so I'm nowhere near this assignment. While I'm waiting to hear back from Marilyn, I've been doing the assignments that are up ahead. I get them to run, refine them the best I can, and I'll submit them when the time comes.
Anyway...
I have this in my autoexec.bat file
PATH=C:\JDK1.3\BIN;%PATH%;
set CLASSPATH=.;C:\JavaFiles;C:\JavaFiles\JavaRanchCommon.zip;%CLASSPATH%
and JavaRanchCommon.zip is in C:\JavaFiles
but I still can't get my compiler to find com.javaranch.common.*
What am I doing wrong?
Thanks
Paul R
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul, I'm doing the same as you - working ahead.
I had the same problem. I had to put the javaranchcommon.zip in my jdk1.3 dir before the compile could find com.javaranch.common.*.
This is the classpath I am using.
SET CLASSPATH=C:\jdk1.3\javaranch\javaranchcommon.zip;D:\My_Java\;.;
I don't know if this is the best way, but it works.
Could you tell me what the %CLASSPATH% does? I haven't been using it.
 
tumbleweed
Posts: 5089
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul what compiler are you using ?
 
Paul Ralph
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No luck.
It now looks like this:
PATH=C:\JDK1.3\BIN;%PATH%;
SET CLASSPATH=C:\jdk1.3\javaranch\javaranchcommon.zip;.;
Could some of the rest of the autoexec.bat be interfering? I don't know what else to think. I've tried compiling from the
C:\jdk1.3\javaranch\ directory. I'm stumped.
Thanks for trying, though.
Paul R
 
Paul Ralph
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Johnannes: JDK 1.3.0 I use Windows95 Any other info that would be helpful?
Paul R
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have this in my autoexec.bat file
PATH=C:\JDK1.3\BIN;%PATH%;


Looks good as far as it goes. What is in %PATH% ?


set CLASSPATH=.;C:\JavaFiles;C:\JavaFiles\JavaRanchCommon.zip;%CLASSPATH%
and JavaRanchCommon.zip is in C:\JavaFiles


This looks good, too. What does your import statement look like? (I assume all your *.java files and your *.class files are in C:\JavaFiles)

 
Johannes de Jong
tumbleweed
Posts: 5089
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul sorry I meant do you compile directly from a editor or at the dos prompt. Sometimes the editor does not see the classpath and you have to manually set it in the options of the editor.
In you statement :
set CLASSPATH=.;C:\JavaFiles;C:\JavaFiles\JavaRanchCommon.zip;%CLASSPATH%
Try it like this :
set CLASSPATH=C:\JavaFiles;C:\JavaFiles\JavaRanchCommon.zip;
Good luck

[This message has been edited by Johannes de Jong (edited April 26, 2001).]
 
Paul Ralph
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am grateful to say it now works. Ultimately it worked because Marilyn pointed me to an incorrect import statement. (I had it as com.javaRanch.common.* ; ) However, I know that wasn't the only problem because capitalizing the R was the last desperate thing I tried before starting this thread. I don't technically know if Johannes had an assist or not, but...
I don't care. I give credit and MANY THANKS TO YOU BOTH!!!

Paul R

[This message has been edited by Paul Ralph (edited April 27, 2001).]
 
Johannes de Jong
tumbleweed
Posts: 5089
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually the capital R came from Marilyn I only cut & pasted her line , remember she is the nitpicker always checking the finer points
gee I wish I tried harder at spelling in school
[This message has been edited by Johannes de Jong (edited April 27, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic