In my application I load resources in this manner:

```
WinProcessor.class.getResource("repository").toString();

```

and this gives me:

```
file:/root/app/repository   (and I replace "file:" with empty string)

```

This works fine when I run my application from the IDE, but when I run the jar of my application:

```
java -jar app.jar

```

The path becomes:

```
jar:/root/app.jar!/repository

```

is there any way to solve this problem?

I'll use the "repository" dir name in order to create this:

```
ConfigurationContext ctx = (ConfigurationContext) ConfigurationContextFactory.createConfigurationContextFromFileSystem(repositoryString, null);

```

In the same manner, I'll get one file name (instead of a dir) and I'll use it this way:

```
System.setProperty("javax.net.ssl.trustStore", fileNameString)

```