Differences between running in idea & running on the command-line

My google-fu seems to be failing me since I don't seem to be able to find any way of working out what the differences are between the idea run environment, and the command-line one.

I have a project which when executed from within idea works perfectly, however it's intended to be run from the command-line, where it fails abysmally - I suspect that the problem is a classpath/dependancy issue, however getting the two environments quantified is where I am falling down.

Once I can work out what is missing from the uberjar then I can add it to my shade/assembly config & I should be good to go!

Does anyone have any tips on how to analyse the differences between the two run environments?

5 comments
Comment actions Permalink

The exact command line that IntelliJ IDEA uses to start a process is printed to the run console.

0
Comment actions Permalink

check also what working directory is used within intellij/testcase (e.g. module root or project root). ..for rxample, this can cause loading (file) resources  fail

0
Comment actions Permalink

What's interesting is that when run with the exact command line which idea uses, everything works as it does in the IDE ... if however I copy across the classpath, then things fail ... which leads me to suspect that the idea launcher is doing something more than I am expecting it to!

If needs be I can sanitise the two different command lines & provide them.

Thanfully there are no resources involved in this code ... I believe that this is purely a linking/dependancy issue.

0
Comment actions Permalink

I can confirm that merely removing the idea launcher from the command-line causes the code to fail.

So ... any idea what this launcher is doing differently?

0

Please sign in to leave a comment.