Reputation: 6089
I have write a small Java program using SWT GUI which search a given word inside a given text file, but when I run the program in Eclipse it works well, and if I exported it as a runnable jar file, in my PC it works well, but when I run it in other PC’s then it doesn’t work (cannot run, dosen't luanch the frame)… and also the same Java JDK (1.7) is installed in both my and other PC’s. Before JDK1.7 when I execute the runnable jar file it works well in all other PC’s, but now any jar file cannot run in other PC’s, but only in my PC…. Now if someone knows what the problem is, please suggest me how to solve.
Note: I exported the jar file in three options, but the result for all was the same.
Thanks in advance!
Upvotes: 0
Views: 1608
Reputation: 6089
I have discovered the problem with "JAR runnable file cannot execute in other PC", the problem was with SWT library which cannot executed in 64bit JVM, my machine is 32bit. It throws the exception below:
java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
Upvotes: 0
Reputation: 12991
Go to Build path -> configure Build path -> Order and export
and check your jar file.
after that, try to create new runnable jar file.
Upvotes: 2