File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Files recognized on my computer but not another??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Files recognized on my computer but not another???" Watch "Files recognized on my computer but not another???" New topic
Author

Files recognized on my computer but not another???

Brian Snyder
Ranch Hand

Joined: Feb 03, 2001
Posts: 142
Hello,
I have created a software application written in Java. When it executes on my machine it works perfectly. I'm then putting it on a disk or zipping it up and sending it to someone else. Once they place the folder on their c:\ drive, it doesn't work. It seems as though it is not recognizing certain folders/files.
Both machines are using Windows, and both are being placed in the same folder. My C drive is just c:\. His C-Drive has a label. I think this is what is effecting the program.
How can I recognize the 'universal' C-Drive so that my program will work on any Windows OS??
Regards,
Brian Snyder
marilyn murphy
Ranch Hand

Joined: Aug 28, 2001
Posts: 84
A label on the drive should not affect the Java application. Does he have the JRE on his computer? Are the files the app is looking for .class files? Are you using native methods?
Brian Snyder
Ranch Hand

Joined: Feb 03, 2001
Posts: 142
Yes, he has the JRE. and yes it is looking for a .class file.
???
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
If your classpath has the c: drive in it, and his does not you would get this behavior. The solution is to insure that his classpath gets updated to include the place that you put your files OR to reset the classpath just before executing your file.
In a .bat file you can have
set classpath = whatever;
java myApp
Then just double click the bat file.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Files recognized on my computer but not another???