There is nothing wrong with the way you have the tool set up now, without Docker, and I would keep doing what you're doing unless you're trying to address some specific problem with it.
When you write out the problem description as "browse the file system", "exports into files", "run a jar file", this isn't an architecture that works well in Docker. Sharing files between containers is tricky (requires startup-time options, there are lurking permission issues), one container can't directly run a command in another, and one container can't start another container without being trusted with unrestricted root-level access over the whole system.
Rebuilding this into a form that would work well with Docker would involve some reengineering, that's kind of secondary to the actual problem you're trying to solve. Two typical approaches:
Instead of the Java tool being a tool that's run once and exits, make it be a long-running process with an HTTP interface. The Django front-end would HTTP POST a file it wants processed, and get the results back in the HTTP response.
Deploy a job queue like RabbitMQ. When the Django application has a file it wants processed, it posts it into the job queue. Wrap the Java tool in a worker that reads from the request queue, does its processing, and writes to a response queue. The Django application is then able to pick up the response.
The last option is "most industrial" -- if you needed to process thousands of files at a time, scale up and down the number of Java workers you had based on the workload, and generally run this as a production network service, it's a good way to go. That doesn't sound like the scale you're aiming for.
Finally: you should never eval()
anything, and you should especially never eval()
something you're getting from an HTTP request. That's a massive security disaster waiting to happen. (Anyone who can reach your service would be able to read or write any file your service could, and potentially even change the code the service is running; this could very easily become a scenario where someone takes over your entire system.)