1

can anyone help?

I have reading various blogs and it appears to include i18n properties and otherfiles i have to add them as module dependency, choose Jar .. Directories and then chosing "classes" category.

I have done this but i keep getting an error saying that it can't find an XML file. Specfically this

admin-sidebar.xml

I managed to fix this by adding the 2 directories under Projec Settings, SDK, and adding them to classpath.

but this is annoying that it doesn't work the way in the tutorials.. i must be doing something wrong.

I have to add 2 directories into the class path.

the first directory has about 8 .properties files, these are standard javabundles.

the next directory has the following content

admin-sidebar.xml METAINF (a directory) mime.types (a file inside the METAINF directory)

Can anyone tell me what i am doing wrong, of course i can leave it the way i have done which seems to fix the issue, but it just feels like i am not doing it right

Any ideas or help?

Thanks in advance

EDIT

Here is the project zipped up.

https://docs.google.com/open?id=0ByGL4ug6mtrsdFFNNmtZNXMxV0k

Ok, this is what i am doing, add modules but it doens't work

how it looks when adding, i choose classes

enter image description here

and this is how it looks when added

enter image description here

This above doesn't work, but adding it directly too the jdk class path works, notice its the same 2 dirs.

enter image description here

The contents of the directory are (in order)

enter image description here

enter image description here

enter image description here

Martin
  • 23,844
  • 55
  • 201
  • 327

1 Answers1

2

You either configure it as a library (classpath) entry added to the module dependencies or you set up the directory as Sources so that these files are automatically added to the classpath (and copied to output according to Settings | Compiler | Resource Patterns).

If this approach doesn't work, please share a sample project with either configuration showing the issue.

See also my reply to the related question: Add a properties file to IntelliJ's classpath.

Community
  • 1
  • 1
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • Thanks CrazyCoder, i have updated my msg with screenshots and the sample project. I hope everything is in order. Thanks once again. I know its probably something i am doing wrong. – Martin Jun 22 '12 at 14:11
  • Looks like you are adding dependencies to the wrong module (`Broadcast`), while they should be added to a different module (most likely `Openfire_src`). – CrazyCoder Jun 22 '12 at 14:24
  • sorry crazycode, i did it so fast just to show the example in the screenshots, i have already tried that.. i will it again.. but for sure its the same... check back in 5 mins – Martin Jun 22 '12 at 17:51
  • wow! you were right! that was it!. i wonder if i could pick your brains very quickly.. i am a kind of person that needs to know why :-) it worked.. ok.. so basically before it was set to copy but i was running opensrc (correct module), i should never add modules under the classpath where the sdk is right? this is wrong, its hands off, its for the sdk (jdk) only... a big thanks for this, your solved my issues... i suppose it didn't use the class path because it was in broadcast and not the opensrc i was using, of course in the right column i should have accepted the correct module (opensrc) – Martin Jun 22 '12 at 17:56