and more specifically the ones
Main class: org.esa.snap.nbexec.Launcher
VM options: -Dsun.java2d.noddraw=true -Dsun.awt.nopixfmt=true -Dsun.java2d.dpiaware=false -Dorg.netbeans.level=INFO -Dsnap.debug=true -Xmx4G
Program arguments: --userdir “/home/ahmad/Documents/Projects/SNAP/snap-desktop/snap-application/target/snap/…/userdir” --patches “/home/ahmad/Documents/Projects/SNAP//snap-engine/$/target/classes:/home/ahmad/Documents/Projects/SNAP/s1tbx/$/target/classes” --clusters “/home/ahmad/Documents/Projects/SNAP/s1tbx/s1tbx-kit/target/netbeans_clusters/s1tbx”
I get the following error:
Exception in thread “main” java.lang.IllegalStateException: Not a valid installation directory: /home/ahmad/Documents/Projects/SNAP
at org.esa.snap.nbexec.Launcher.run(Launcher.java:101)
at org.esa.snap.nbexec.Launcher.main(Launcher.java:86)
Its looking for an directory called etc and another one called platform which are not exist, I tried to create them manually to see what they are and it seems some configurations for clusters which I don’t have its files also
How to solve that?
What have you specified as Working directory?
I guess in your case it should be /home/ahmad/Documents/Projects/SNAP/snap-desktop/snap-application/target/snap
Also, the path to the userdir looks strange. Change it to. /home/ahmad/Documents/Projects/SNAP/snap-desktop/snap-application/target/userdir
In the patches directory, I see a duplicated ‘/’. Don’t know if this can cause trouble
Thanks for your help
You was right about working directory.
But I figured out something not in the documentation that you need to build the snap-desktop & snap-engine before do the configuration otherwise IntelliJ IDEA will reject the paths as target not exist
Also the path to the userdir is ok no need to change it.
I have found another point in the documentations related to “How to create a new product reader” manifest.mf need to update. OpenIDE-Module-Layer: org/esa/snap/dataio/<format-name>/layer.xml
should be OpenIDE-Module-Layer: e/g/org/esa/snap/dataio/<format-name>/layer.xml
In general in case if I found anything how should I report it?
Thank you for the Atlassian wiki link at the top of this topic. I had been attempting to build 8.0 using the README.md on github which is spare with respect to IntelliJ IDEA instruction. The Atlassian wiki pages contain more complete information which I recommend copying or linking into README.md.
Marco and @Nicolas: I am a Java novice. And with your great developer documentation I successfully built and executed SNAP 8.0 using IntelliJ IDEA. I now would like to build a binary, or stand alone JAR, for gpt so I can execute graphs. I have not been able to figure out how to do this in IntelliJ IDEA.
That’s not easily doable. SNAP is not intended to be provided in one Jar. And creating the application is more complex and needs and installer builder like Install4J.
Working directory: F:\SNAP\snap-desktop\snap-application\target\snap
Use classpath of module: snap-main
I run the “Application” configuration file, and also get the following information:
Exception in thread “main” java.lang.IllegalStateException: Not a valid installation directory: F:\SNAP\snap-desktop\snap-application\target\snap
The error message is as follows: Failed to execute goal on project snap-product-library-ui-v2: Could not resolve dependencies for project org.esa.snap:snap-product-library-ui-v2:nbm:8.0.0-SNAPSHOT: Could not transfer artifact gov.nasa:worldwind:jar:2.1.0 from/to snap-repo-public (https://snap-build-server.tilaa.cloud/nexus/repository/snap-maven-public/): GET request of: gov/nasa/worldwind/2.1.0/worldwind-2.1.0.jar from snap-repo-public failed
Have you tried it again. Maybe the server has some temporary issue. Actually the file is available. You can see it when you follow this link: Browse - Nexus Repository Manager
Sometimes you need to run the command multiple times because maven doesn’t manage to download all the dependencies when executing it the first time.