In general, building the jars is done using maven
mvn clean
mvn install
mvn package- this creats a GUI programm (
suresim_gui.jar-with-dependencies.jar) and a CLI program (suresim_cli.jar-with-dependencies.jar) - depending on your OS, there might be additional steps necessary to get this to work.
- Both programs can be run using
java -jar XXX arg1, arg2, arg3.
- Install maven build management, preferably through homebrew
brew install mvn- build project
- due to changing restrictions on spawning gui threads starting in OS 10.14, a specific combination of java and the apple SDK is required.
- a working solution from 23.09.2020 is to install the zulu java version.
- Then build the project with the new java version, see commands below
# list java versions on machine
/usr/libexec/java_home -V
# make zulu default java
export JAVA_ZULU_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
export JAVA_HOME=$JAVA_ZULU_HOME
# build with maven
mvn clean
mvn install
mvn package- run the application via the command line
./run_macos.sh /path/to/target
# Example:
./run_macos.sh STORMVis/target- (Optional) add java version to eclipse and run in eclipse
- See doc/eclipse.md
2020-09-22 16:45:04.520 java[64585:7666166] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff338dcbe7 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff6c51b5bf objc_exception_throw + 48
2 CoreFoundation 0x00007fff339053dc -[NSException raise] + 9
3 AppKit 0x00007fff30b03ddc -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
4 AppKit 0x00007fff30aeb842 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
5 AppKit 0x00007fff30aeb2b3 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
6 libnativewindow_macosx.jnilib 0x00000001a1ea90c8 Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 440
7 ??? 0x000000010bfd3330 0x0 + 4496110384
)
libc++abi.dylib: terminating with uncaught exception of type NSExceptionKnown issues:
FIXED (23.09.2020):
-
Fixed by switching to zulu-java 11
-
Simply download and install the package
-
To list the java versions installed on your machine run
/usr/libexec/java_home -V
Matching Java Virtual Machines (3):
11.0.8, x86_64: "Zulu 11.41.23" /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
11.0.8, x86_64: "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home- to switch the default java version to the newly installed one, run
# simple way to switch java versions
# from https://medium.com/w-logs/installing-java-11-on-macos-with-homebrew-7f73c1e9fadf
export JAVA_ZULU_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
export JAVA_HOME=$JAVA_ZULU_HOME- to reset the default java version, just open a new shell