• 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

Files recognized on my computer but not another???

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, he has the JRE. and yes it is looking for a .class file.
???
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
I knew that guy would be trouble! Thanks 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