aspose file tools*
The moose likes Cattle Drive and the fly likes Can't configure classpath for OOP-1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Can Watch "Can New topic
Author

Can't configure classpath for OOP-1

Paul Ralph
Ranch Hand

Joined: Aug 10, 2000
Posts: 312
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
Richard Boren
Ranch Hand

Joined: Mar 01, 2001
Posts: 233
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.
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
Paul what compiler are you using ?
Paul Ralph
Ranch Hand

Joined: Aug 10, 2000
Posts: 312
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

Joined: Aug 10, 2000
Posts: 312
Johnannes: JDK 1.3.0 I use Windows95 Any other info that would be helpful?
Paul R
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
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)


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
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

Joined: Aug 10, 2000
Posts: 312
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
Bartender

Joined: Jan 27, 2001
Posts: 5089
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).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't configure classpath for OOP-1