Jump to content

Cannot run jar file that contains AUTOIT commands

Recommended Posts



I have written a simple code using selenium and autoit in eclipse IDE to download a file from our internal file transfer .

access to file transfer leads to a pop window to enter username and password.


I have used autoit to enter username and password.

Now when i run this program from eclipse,it executes succesfully.i.e username and password is set correctly

now i generated a runnable jar file of this project and run it through cmd, but the execution fails at login window itself.username and password is not enetered when executed through jar file.I get the below error in cmd

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Sou
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(
Caused by: java.lang.ExceptionInInitializerError
        at com.ftp.launch.main(launch.java:58)
        ... 5 more
Caused by: java.lang.NullPointerException
        at org.sikuli.script.RunTime.init(RunTime.java:635)
        at org.sikuli.script.RunTime.get(RunTime.java:291)
        at org.sikuli.script.RunTime.get(RunTime.java:126)
        at org.sikuli.script.RunTime.get(RunTime.java:316)
        at org.sikuli.script.Region.<clinit>(Region.java:31)

any help is appreciated
        ... 6 more



Share this post

Link to post
Share on other sites

I made some tests on my side

its not only login pop window but the jar file does not run if AUTOIT is used at the beginning of the main class

Share this post

Link to post
Share on other sites


I suggest you post the code you are using - see here how to do it.



Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now