简体   繁体   中英

Relative path on Eclipse EE

I'm doing a project in Eclipse EE and tried to give the relative path to take a file to use as a template to generate a JasperReport report, but not giving me errors. But if I give an absolute like "D: \\ \\ template" does not fail.

My question is how do I tell you to choose the relative path to a folder called "Template-report" that is in: >> src >> project name-reports >> template.jasper templates.

regards

Relative paths in application launched from Eclipse are resolved relative to the application's working directory. By default, this is the (file system) directory that corresponds to the project, but you can alter it using the application launcher configuration.

This Q&A offers an alternative approach (I think): Default eclipse working directory

您可以尝试使用eclipse变量来引用项目到工作区中,看看这个

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM