Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Export as jar" output will not run #33

Closed
mattrussmill opened this issue Sep 21, 2018 · 5 comments
Closed

"Export as jar" output will not run #33

mattrussmill opened this issue Sep 21, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@mattrussmill
Copy link

When I perform a File > Export as jar to generate a jar from the IDE and run java -jar test_sikuli.jar in the command prompt I get the following error: Error: Invalid or corrupt jarfile test_sikuli.jar.

This script will run correctly if I export via File > Export as runnable jar. I have been trying to perform a workaround by launching the jar via the class path java -cp test_sikuli.jar [some path] but have been unsuccessful finding the correct class to use.

Is there a solution or possible workaround to this problem? I am using Java Version 8 Update 181

@RaiMan
Copy link
Owner

RaiMan commented Sep 22, 2018

Which version of SikuliX?

@RaiMan RaiMan added the question Further information is requested label Sep 22, 2018
@mattrussmill
Copy link
Author

1.1.4

@RaiMan RaiMan added bug Something isn't working and removed question Further information is requested labels Sep 24, 2018
@RaiMan
Copy link
Owner

RaiMan commented Sep 24, 2018

I admit: neither implementation nor docs are consistent. I will fix and doc it asap to make it useable in your sense.

@Angernoxo
Copy link

I haven't been able to export any jar file, they always have invalid or corrputed jarfile.

1.1.4-SNAPSHOT-2019-02-14_12:57/Windows10.0/Java11(64)11.0.2+9-LTS

Is there any way to create JAR files? Every time I want to run Sikulix programs I make, I need to do it through the IDE,, :( any help is appreciated

@RaiMan
Copy link
Owner

RaiMan commented Mar 18, 2019

@Angernoxo
see how to run scripts from command line
for the options

instead of
runsikulix(.cmd)

use
java -jar path-to/sikulixide.jar

The jars produced from the file menu in the IDE are not runnable standalone. They currently need a special main script to run them from command line using SikuliX. Come back for more information about that not yet sufficiently documented/implemented option, if you want to give your scripts to someone else, so they can only be run but neither edited nor opened for looking at the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants