• 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

Problem running on another PC

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I have made a Java project using JDBC and Swing and used MS Access as database. I have used JDBC-ODBC Bridge Driver to connect with database. Now when i run on another PC,
1) i make the required DSNs to make the project run.
2) i also have some files that store comboboxes and some store vector arrays. I copy those files on the PC.
3) Also i read some excel files using FileInputStream(using ApachePOI). I also copy these excel files on the PC.

The actual problem is with the last two. When i run the program, the part that only uses the DSNs runs perfectly but the part of the program that also tries to read the files does not run.
I have made a JAR file of the program whose main class is my program's first page.

Any idea what i can do to make the whole project run on another PC.

Thanks in advance

 
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We need more information - what is a DSN? What errors do you get? etc.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How does the part that reads the files address them?

Have you made assumptions about the "current" directory? That is a common error.

Bill
 
Paras Ahuja
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi William,
You got my error. But how am i supposed to rectify it?
Should i keep all the files in a common place(like C:/) and access them from there?
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paras Ahuja wrote:Should i keep all the files in a common place(like C:/) and access them from there?


No, because not all machines will have a C: drive. Normal practise for stuff that is 'tied to' an app is to include them in the jar.

Winston
 
reply
    Bookmark Topic Watch Topic
  • New Topic