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

Is the Test.app supposed to do something other than fail? #44

Open
joewiz opened this issue Jun 1, 2019 · 7 comments
Open

Is the Test.app supposed to do something other than fail? #44

joewiz opened this issue Jun 1, 2019 · 7 comments

Comments

@joewiz
Copy link
Contributor

joewiz commented Jun 1, 2019

Running ant test leaves a Test.app in the project folder. Double-clicking on this app results in a dock icon briefly appearing, then disappearing. Running the application from the command line yields errors:

$ open Test.app/
LSOpenURLsWithRole() failed with error -10810 for the file /Users/joe/workspace/appbundler/Test.app.
$ Test.app/Contents/MacOS/JavaAppLauncher 




Loading Application 'Test'
Working Directory: '/Users/joe'
Java Runtime (jdk1.8.0_211.jdk) Relative Path: '/Users/joe/workspace/appbundler/Test.app/Contents/PlugIns/jdk1.8.0_211.jdk' (dylib: /Users/joe/workspace/appbundler/Test.app/Contents/PlugIns/jdk1.8.0_211.jdk/Contents/Home/jre/lib/jli/libjli.dylib)
Launchpath: /Users/joe/workspace/appbundler/Test.app/Contents/PlugIns/jdk1.8.0_211.jdk/Contents/Home/jre/lib/jli/libjli.dylib
Main Bundle Path: '/Users/joe/workspace/appbundler/Test.app'
Main Class Name: 'com/javafx/main/Main'
Option: -Dapple.laf.useScreenMenuBar=true
Command line passed to application:
Arg 0: 'Test.app/Contents/MacOS/JavaAppLauncher'
Arg 1: '-Djava.library.path=/Users/joe/workspace/appbundler/Test.app/Contents/MacOS'
Arg 2: '-DLibraryDirectory=/Users/joe/Library'
Arg 3: '-DDocumentsDirectory=/Users/joe/Documents'
Arg 4: '-DApplicationSupportDirectory=/Users/joe/Library/Application Support'
Arg 5: '-DCachesDirectory=/Users/joe/Library/Caches'
Arg 6: '-DApplicationDirectory=/Users/joe/Applications'
Arg 7: '-DAutosavedInformationDirectory=/Users/joe/Library/Autosave Information'
Arg 8: '-DDesktopDirectory=/Users/joe/Desktop'
Arg 9: '-DDownloadsDirectory=/Users/joe/Downloads'
Arg 10: '-DMoviesDirectory=/Users/joe/Movies'
Arg 11: '-DMusicDirectory=/Users/joe/Music'
Arg 12: '-DPicturesDirectory=/Users/joe/Pictures'
Arg 13: '-DSharedPublicDirectory=/Users/joe/Public'
Arg 14: '-DSystemLibraryDirectory=/Library'
Arg 15: '-DSystemApplicationSupportDirectory=/Library/Application Support'
Arg 16: '-DSystemCachesDirectory=/Library/Caches'
Arg 17: '-DSystemApplicationDirectory=/Applications'
Arg 18: '-DSystemUserDirectory=/Users'
Arg 19: '-DUserHome=/Users/joe'
Arg 20: '-DSandboxEnabled=true'
Arg 21: '-DDarkMode=false'
Arg 22: '-DLaunchModifierFlags=0'
Arg 23: '-DLaunchModifierFlagCapsLock=false'
Arg 24: '-DLaunchModifierFlagShift=false'
Arg 25: '-DLaunchModifierFlagControl=false'
Arg 26: '-DLaunchModifierFlagOption=false'
Arg 27: '-DLaunchModifierFlagCommand=false'
Arg 28: '-DLaunchModifierFlagNumericPad=false'
Arg 29: '-DLaunchModifierFlagHelp=false'
Arg 30: '-DLaunchModifierFlagFunction=false'
Arg 31: '-Dapple.laf.useScreenMenuBar=true'
Arg 32: '-m'
Arg 33: 'com/javafx/main/Main'
Arg 34: 'foo=bar'
Arg 35: '-Djava.library.path=/Users/joe/workspace/appbundler/Test.app/Contents/MacOS'
Arg 36: '-DLibraryDirectory=/Users/joe/Library'
Arg 37: '-DDocumentsDirectory=/Users/joe/Documents'
Arg 38: '-DApplicationSupportDirectory=/Users/joe/Library/Application Support'
Arg 39: '-DCachesDirectory=/Users/joe/Library/Caches'
Arg 40: '-DApplicationDirectory=/Users/joe/Applications'
Arg 41: '-DAutosavedInformationDirectory=/Users/joe/Library/Autosave Information'
Arg 42: '-DDesktopDirectory=/Users/joe/Desktop'
Arg 43: '-DDownloadsDirectory=/Users/joe/Downloads'
Arg 44: '-DMoviesDirectory=/Users/joe/Movies'
Arg 45: '-DMusicDirectory=/Users/joe/Music'
Arg 46: '-DPicturesDirectory=/Users/joe/Pictures'
Arg 47: '-DSharedPublicDirectory=/Users/joe/Public'
Arg 48: '-DSystemLibraryDirectory=/Library'
Arg 49: '-DSystemApplicationSupportDirectory=/Library/Application Support'
Arg 50: '-DSystemCachesDirectory=/Library/Caches'
Arg 51: '-DSystemApplicationDirectory=/Applications'
Arg 52: '-DSystemUserDirectory=/Users'
Arg 53: '-DUserHome=/Users/joe'
Arg 54: '-DSandboxEnabled=true'
Arg 55: '-DDarkMode=false'
Arg 56: '-DLaunchModifierFlags=0'
Arg 57: '-DLaunchModifierFlagCapsLock=false'
Arg 58: '-DLaunchModifierFlagShift=false'
Arg 59: '-DLaunchModifierFlagControl=false'
Arg 60: '-DLaunchModifierFlagOption=false'
Arg 61: '-DLaunchModifierFlagCommand=false'
Arg 62: '-DLaunchModifierFlagNumericPad=false'
Arg 63: '-DLaunchModifierFlagHelp=false'
Arg 64: '-DLaunchModifierFlagFunction=false'
Arg 65: '-Dapple.laf.useScreenMenuBar=true'
Arg 66: '-m'
Arg 67: 'com/javafx/main/Main'
Arg 68: 'foo=bar'
Unrecognized option: -m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Does anyone know what the expected behavior is for Test.app?

@rschmunk
Copy link
Contributor

rschmunk commented Jun 2, 2019

Adam, I can't really speak for the problem with Test.app, other than having experienced it myself. The only possibly useful thing I might ask about, though, is that it is trying to start from com/javafx/main/Main.java. Does that class exist in the Java distro? (Or did it, before JavaFX was removed from 11?)

What I would like to comment is the list of args in your output above. Note that the set of 34 args is repeated. This means that the second set are all passed to the com/javafx/main/Main.java code as command-line arguments.

I ran into this yesterday because an app of mine using the latest and greatest appbundler was checking for command-line args, and it complained up a storm about the 30+ unknown options it was being given.

Spent an hour or two trying to figure out what was causing this, but other than determining it arose in one of the last commits made to appbundler before @sreilly officially moved it from Bitbucket to Github, I didn't get anywhere.

@joewiz
Copy link
Contributor Author

joewiz commented Jun 2, 2019

@msdsoftware What you ran into yesterday sounds a lot like my report in #45.

@rschmunk
Copy link
Contributor

rschmunk commented Jun 2, 2019

@joewiz You may be right about that. I must have not looked at #45 closely enough when I was scanning through notifications.

@rschmunk
Copy link
Contributor

rschmunk commented Jun 2, 2019

The tasks for building Test.app and TestPlugin.app both place SwingInterop.jar in the classpath, but where is it? Some time with the Google suggests this is something dating back to JavaFX in 2012, and frankly is no longer compatible with appbundler.

@joewiz
Copy link
Contributor Author

joewiz commented Jun 3, 2019

If we could get Test.app into a working state, we could use it to create a continuous integration test so that all PRs and commits could be confirmed not to break the test scenarios. We could set it up so that multiple JDKs are tested.

@rschmunk
Copy link
Contributor

rschmunk commented Jun 4, 2019

After mucking about for too long, and scrounging up a copy of SwingInterop.jar off the net, I finagled a way to get Test.app to launch and show me something. What I got was a dialog requiring that I download a newer Java. Same result with several different JDKs. However, launching SwingInterop.jar does work if I simply doubleclick on the jar icon.

@rschmunk
Copy link
Contributor

rschmunk commented Jun 4, 2019

Actually, SwingInterop.jar does not launch when I doubleclick — instead a security popup appears. It does launch if I control-click on it and indicate I want to open it using Jar Launcher. I get the download msg because Jar Launcher is either using the JRE 10 or JDK 9 installed on the machine. Decompiling, I see that SwingInterop.jar is hard-coded to require Java 1.7, 1.8 or 1.9. (Yes, "1.9", not "9".)

So creating Test.app looks useless unless your system has no Java newer than 8 installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants