Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

IntelliJ: Adding resources with unusual extensions onto the classpath

DZone's Guide to

IntelliJ: Adding resources with unusual extensions onto the classpath

· Java Zone
Free Resource

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

We’re making use of MarkLogic and therefore xquery on the project I’m currently working on and recently wanted to add our xquery setup files onto the classpath so they could be used in a test.

We added them into ‘src/main/resources’ and set that as a source path in IntelliJk assuming that was all we needed to do.

Despite doing that our test kept failing because it couldn’t locate the files on the classpath.

Charles eventually came across the compiler resource patterns settings which are accessible from the Preferences > Compiler menu:

Intellij

We had to add “*.xqy” to the end of the list of patterns to get our files picked up.

We came across another file extension that we needed to be on the classpath about 10 minutes later and obviously solved it much quicker that time!

 

From http://www.markhneedham.com/blog/2011/06/09/intellij-adding-resources-with-unusual-extensions-onto-the-classpath/

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}