file Problem to acces text files after packaging the module

3 months 1 day ago #5626 by grsm
Hi, I'm trying to develop a modelio 3.7 module.
I need to access at some text files during the execution of the module command.
I tried to include these files in the resource folder of the maven project to include them in the module, it seems that the files have been included in the jmdac file, but i get an error while trying to access at them during the execution of the module command.
I tried different ways to write their path in the command when it needs to use them but, i cant find the right way.
Thanks in advance, I wait for any suggestions.

Please Log in or Create an account to join the conversation.

2 months 3 weeks ago #5631 by grsm
Can someone help me please?
I don't know where i have to put my config text files in maven project and how can i refer to them during the execution of the module command. I don't know if i have to change something in pom.xml, module.xml to package the files in the module with the possibility to use them.
Thanks

Please Log in or Create an account to join the conversation.

2 months 3 weeks ago #5634 by grsm
Ok, i finnaly solved it putting my files in "myres" folder and using

String pathfrom = getClass().getClassLoader().getResource("myres").getPath();

To get the path of the folder.

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.031 seconds
^ Back to Top