Did you mean JOSM as in Java OpenStreetMap Editor?
You can use the software for whatever purpose you like. It’s free software. Openstreetmap data can be reused for commercial purposes as well, as long as a mention is made that it came from the Openstreetmap contributors.
You cannot, however, include the source code of JOSM in another project that’s not released under the same license once again. So you cannot reuse the source code in a commercial project.
Thanks for answer,
Yes JSOM = Java OpenStreetMap Editor.
I have a project written in Java and the source code is a based on closed license.
I cannot change it.
But it also needs a GML map editor.
If I written an additional external application written under the GPL license (JSOM based modification),
which would communicate with an existing application. It is license violation?