1

I've created a jar file that uses SWT for the UI. When launching the jar file from finder it would return an error saying

Exception in thread "main" org.eclipse.swt.SWTException: Invalid thread access

I finally got it to launch from Terminal using

java -XstartOnFirstThread -jar CommonDenom.jar

That's all well and good, but how do I implement the -XstartOnFirstThread switch when launching from finder? Is there a simple way to do this through the manifest or something or do I have to package a launch script? if the latter, can someone show me how? Thanks.

dbconfession
  • 1,147
  • 2
  • 23
  • 36
  • 1
    You could perhaps use the Oracle [AppBundler](https://java.net/projects/appbundler/pages/Home) to create a Mac application which can include options (see the Wiki page). – greg-449 Mar 09 '14 at 14:52
  • thanks greg. The link seems to only show installation instructions. Where do I get the jar they are talking about? – dbconfession Mar 09 '14 at 15:58
  • 1
    https://java.net/projects/appbundler/downloads – greg-449 Mar 09 '14 at 16:05

0 Answers0