The decision depends a great deal on the software being used. You mentioned Photoshop and OpenStreetMap.
Most software manufacturer's provide some listing of the required hardware and software specs necessary to support their product(s).
The list is generally in the form of "minimal", "recommended", and "best". You do not want "minimal" and you do want as much "best" as you can afford.
For example if any given app only needs or uses 16 GB of RAM then additional RAM may not prove beneficial.
Depending on the app there may or may not be some meaningful difference in performance between the two CPU's being considered. If the performance can be measured and compared in some manner - all other things being equal.
Overall, process will only go as fast as the slowest link in the process. A faster CPU will require more power and if the PSU cannot keep up then all will go slower.
My suggestion is to start by observing how your system is currently using its' resources while video editing and running the java programs.
You can use Task Manager, Resource Monitor, and Process Explorer (Microsoft, free) to do so. Get a sense of what resources are being used, to what extent (%), and what is using any given resource. Use all three tools but only one tool at a time.
The objective being to determine what, if anything is holding the system back: i.e., a "bottleneck".
If a file takes 5 days to process then my question would be, and is, what is the system doing? What part of the process is being slow. Could be inefficient code, lack of disk space/virtual memory, interruptions by background tasks doing updates, backups, or simply "phoning home". Maybe network issues if working with networked drives hosting the SQL database.
You may or may not be able to resolve whatever bottleneck, if any, that exists. Key is to look first and identify some specific issue or problem.