[JAVA] Relative path when running tomcat on eclipse

Conclusion

The current directory when executing on the server [^ 1] is /Applications/Eclipse_2019-03.app/Contents/MacOS/ become.

environment

Eclipse 2019-03 (4.11.0) Tomcat9 macOS 10.13.6 Java11

Trigger

It is necessary to know where the current directory is when specifying a file with a relative path. When running a Java application in Eclipse, the current directory was the project directory. However, when I ran it on the server this time, the current directory was in a different location.

[^ 1]: Eclipse + Tomcat app https://searchman.info/java_eclipse/1100.html

Recommended Posts

Relative path when running tomcat on eclipse
Install tomcat + eclipse on mac
Error when running git push heroku master on Heroku
JSP on tomcat
Internal commands when running Kotlin on IntelliJ IDEA
Precautions when running apps including Jackson on Glassfish 4.1
Path of Jar file running on AWS Elastic Beanstalk
Ruby on Rails Tutorial Troublesome notes when running on Windows
BasicDataSourceFactory is ClassNotFoundException when connecting to DB on Tomcat 8
Tomcat v8 on CentOS7
1002 error on tomcat + webSocket
A memorandum when running Apache Maven on an in-house proxy
Remote debug connection to tomcat running multiple times on CentOS7
Show detailed error in Logger when running Java on server
Output relative path in .classpath file generated by gradle eclipse
Solution when mysql stops working on mac (Rails project running)