Java: NPE, when running jar on other system having sikulixapi.jar packed with the jar

Asked by shadab

I Installed sikulix in my system with option 2...i used the generated api to develop my selenium script....Then i exported my project into runnable jar file with all the external jars attached.....
Then i installed sikulix using 2nd option in another system...also using windows

and then i tried to run the exported jar file in the new system...But getting error :

 :Exception in thread "main" java.lang.reflect.InvocationTargetException...Caused by : java.lang.Null pointer Exception

Question information

Language:
English Edit question
Status:
Open
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

I guess this is a bug (I never tested this option).

workaround:
- do not pack sikulixapi.jar with your app jar
- copy sikulixapi.jar to the other system to any place you like (must be same system type!)
- at runtime of your app jar have a pointer to sikulixapi.jar in your class path

Revision history for this message
RaiMan (raimund-hocke) said :
#2

made it a bug

Revision history for this message
shadab (shadab1rizvi) said :
#3

So sorry ..for a very basic question.....
How can i perform the last step....
-at runtime of your app jar have a pointer to sikulixapi.jar in your class path

i am running the jar file in cmd using the command : java -jar pathofjar

Revision history for this message
shadab (shadab1rizvi) said :
#4

i just checked .....i can't run m own jar file using command prompt...but i am able to run it via eclipse ...whats the explaination ??

Can you help with this problem?

Provide an answer of your own, or ask shadab for more information if necessary.

To post a message you must log in.