How to run SNAP from an IDEA

try to run the source code using IntelliJ IDEA. i follow all the steps in
But in Run/Edit Configurations, it reminds me that the main class org.esa.snap.nbexec.Launcher is not found in module snap-main. Any clue?

Have you built snap before as described in How to build SNAP from sources?
I think at least snap-engine must be built once. You can use the maven tool of IntelliJ to do it.

i do build all the parts. Anyway I build snap-engine again, it works fine now. BTW, I have another question, if I change some codes, like a function in s1tbx, to run it, I need to use marvin tool to rebuild(compile) s1tbx? It takes some time…

It depends on what you have changed. Often you can simply use IDEA to compile the code.
For maven you can use the ‘-skipTests’ option to speed up the build process. And you do not need to build the whole toolbox. You can only build the module you are currently working on.

In IDEA you can use integrated tool to start maven and to disable the tests

You can also set the thread count in the maven settings. This allows multiple modules to be built in parallel.

1 Like

Thanks for the detailed explanation!