1

I am writing an app on Intellij Idea and it works fine inside the environment, but today I've tried to build artifact and got this error:

LSOpenURLsWithRole() failed for the application with error -10810.

I have tried to open .jar on mac and on windows 10 - doesn't work anywhere.

By partial cutting the code I've come to the conclusion, that there is a problem with images. After that, I've deleted any strings of code, working with images and .jar file compiled and works.

What could be wrong and how to fix it?

I didn't anything extraordinary with images, all the lines of code that work with images looks like:

Image Print=new Image("images/Print.png");

ClassIcon.setFitHeight(0.35*x);

ClassIcon.setFitWidth(0.8*y);

ClassIcon.setLayoutX(0.25d*x);

ClassIcon.setLayoutY(0.065*y);
CKE
  • 1,533
  • 19
  • 18
  • 29
imprezoful
  • 11
  • 6
  • does "images/Print.png" exists in your jar file? – guleryuz Jul 01 '18 at 04:56
  • @guleryuz yes it does. I have tried to make a new project with "hello world" frame , add all my images into and compile to jar. It dropped again with same error. then i have tried to delete images one-by-one and got the next situation: with one of images, added via "Image Print=new Image( );" jar file doesn't work. With other ones it worked and i still get compiled "hello world" frame. Then i have tried to just delete this image everywhere in code on my main project and compile, but it still doesn't work. inside the environment it keep works and i do see all the images during program work – imprezoful Jul 01 '18 at 06:11
  • possibly the issue is IntelIJ, see https://stackoverflow.com/questions/19594627/open-java-applications-fail-silently-on-os-x-mavericks and https://stackoverflow.com/questions/20325308/appbundle-throws-lsopenurlswithrole-failed-with-error-10810-after-compiling – fabian Jul 01 '18 at 07:22
  • Problem is solved. There was 2 problems: 1) is .gif - dunno why, but into Intellij idea they worked, outside - aren't. 2) problem was into image names. Intellij idea wasn't sensitive to the register of characters, other way .jar files crashed cause of they couldn't find images. – imprezoful Jul 01 '18 at 13:47

0 Answers0