Terminal window is reopened in different directory after restart
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 27
### What happened
After opening a project in the terminal using Open in Terminal, which starts the terminal in the project directory, then exiting NetBeans and restarting NetBeans, NetBeans automatically recreates the terminal window, however starting in the NetBeans installation directory rather than in the project directory. If NetBeans remembers the terminal windows across restarts, it should also remember the directories they were started with. Otherwise this just creates a useless terminal window, and it's quicker to use Open in Terminal on the project again.
This is on Windows with Cygwin.
### Language / Project Type / NetBeans Component
Project, Terminal
### How to reproduce
1. Open a project in NetBeans (in my case a Java Maven project).
2. In the _Projects_ view, invoke _Open in Terminal_ in the project's context menu.
=> Observe that the current directory in the terminal is the project directory.
3. Exit NetBeans.
4. Start NetBeans again.
=> A new terminal window is automatically opened, but its current directory is the NetBeans installation directory
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows, Cygwin
### JDK
21
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Reproduce the restart scenario on Windows with Cygwin, following the issue's Open in Terminal steps. Trace the terminal window restoration and working-directory handling; done means a terminal reopened after restarting NetBeans starts in the original project directory rather than the installation directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100