Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem running on another PC

 
Paras Ahuja
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • 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

 
Ralph Cook
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We need more information - what is a DSN? What errors do you get? etc.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
Winston Gutkowski
Bartender
Pie
Posts: 10571
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic