Я пытаюсь найти путь к текущему запущенному/отлаживаемому проекту программно на Java, я посмотрел в Google, и то, что я нашел, было System.getProperty("user.id")
, что не привело меня к пути к проекту.
Я знаю, что команда Environment.currentDirectory
в С# дает путь к текущему запущенному/отлаженному проекту, поэтому я уверен, что в Java тоже должен быть аналогичный.
Итак, я спрашиваю, может ли кто-нибудь сказать мне или дать мне код, как программно определить путь к текущему запущенному/отлаживаемому проекту?
изменить: Я пишу плагин, который загружается с запуском eclipse. плагин добавляет кнопку в рабочую среду eclipse, в коде плагина когда я нажимаю кнопку, я ищу текущий путь к каталогу.
моя цель заключается в том, что, например, когда я отлаживаю проект и затем нажимаю кнопку, появится окно, представляющее отлаженный путь проекта, спасибо