Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassPathResource directory resolution fails in intellij #6483

agibsonccc opened this issue Sep 24, 2018 · 1 comment


Copy link

commented Sep 24, 2018

When specifying a relative url in ClassPathResource such as:

ClassPathResource classPathResource = new ClassPathResource("hadoop-2.7.1/bin/");
File hadoopDir = new File("C:\hadoop\");
if(!hadoopDir.exists()) {
if (hadoopDir.mkdirs()) {
classPathResource.copyDirectory(new File("C:\hadoop\"));
System.setProperty("HADOOP_HOME", "C:\hadoop\");
else {
throw new IllegalStateException("Unable to create hadoop directories");

Copy directory goes here:

The problem with this approach is the relative path resolves to the wrong directory like:

What this should do is resolve to the resources directory in a different module.

@AlexDBlack AlexDBlack self-assigned this Oct 3, 2018

AlexDBlack added a commit that referenced this issue Oct 3, 2018
AlexDBlack added a commit that referenced this issue Oct 4, 2018
More Misc DL4J/ND4J Fixes (#6510)
* #6483 ClassPathResource non-JAR directory fix

* #6362 Add system properties for DL4J and ND4J temporary file locations

* #6347 Fix NDArray.get() on 1d with single interval

* #6276 Make MLN/CG.clearLayerStates() public

* Trigger CI

* Test fixes

* Re-add model guesser method still needed downstream

This comment has been minimized.

Copy link

commented Nov 3, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Nov 3, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
2 participants
You can’t perform that action at this time.