question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Export as jar" output will not run

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RaiMancommented, 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.

0reactions
RaiMancommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Program runs in Eclipse, but exported runnable jar file will not ...
Run it from the command line. This will allow you to see the exception that's thrown that's preventing your program from progressing. java...
Read more >
Importing and Exporting Java Projects as JAR Files in Eclipse
1. Start Eclipse and navigate to your workspace. · 2. In Package Explorer, left-click on the project you want to export. · 3....
Read more >
Executable jar file not running - CodeRanch
I exported the executable jar file but when i double click it,nothing happens.I also tried running it from the cmd but nothing happens....
Read more >
How to create and execute JAR file in Java - Javarevisited
Creating JAR file in java from the command prompt is always been little tricky ... This jar can not be executed and you...
Read more >
Java Rules | Bazel
Note that this attribute has no effect on *_deploy.jar outputs. launcher. Label; optional. Specify a binary that will be used to run your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found