Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

windowsHide: true was hardcoded in spawn options, preventing Java UI components (e.g., PrinterJob.printDialog()) from displaying on Windows and causing indefinite blocking.

Changes

  • Core: Made windowsHide configurable via runOptions parameter (defaults to true for backward compatibility)

    // Before: hardcoded
    windowsHide: true
    
    // After: configurable with same default
    windowsHide: runOptions.windowsHide !== undefined ? runOptions.windowsHide : true
  • TypeScript: Added windowsHide?: boolean to JavaCallerRunOptions interface

  • CLI: Added --no-windows-hide flag support with filter-based parsing to handle multiple occurrences

  • Documentation: Added parameter documentation and usage examples to README

Usage

Library:

await java.run([], { windowsHide: false });

CLI:

node index.js --no-windows-hide

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.adoptopenjdk.net
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/node-java-caller/node-java-caller/node_modules/.bin/mocha test/**/*.test.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Regarding configuration issues</issue_title>
<issue_description>Image
As shown in the image, the configuration item windowsHide: true is hardcoded. In some scenarios, this setting needs to be set to false. It is recommended to restore it to a dynamically modifiable setting. In Java, I need to call PrinterJob job = PrinterJob.getPrinterJob(); job.printDialog();, which involves a java.exe pop-up window. If this setting is enabled, the pop-up window cannot appear, and the program will remain blocked.</issue_description>

<agent_instructions>Add a new parameter --windows-hide (default true), but if --no-windows-hide is sent, call java accordingly</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@nvuillam @LyingDoc if you want to add a CLI parameter and/or an env variable handling that, i'll be glad to merge the PR :) @nvuillam @LyingDoc > let's go with `--no-windows-hide` (if called by CLI) / `windowsHide (default: true)` (if called as library) ? @nvuillam @LyingDoc i'm talking about the name of a parameter you could add on a future Pull Request to contribute to the project :)

But if you don't feel doing it, i can ask GitHub Copilot :)</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 7, 2026 10:15
Co-authored-by: nvuillam <17500430+nvuillam@users.noreply.github.com>
Co-authored-by: nvuillam <17500430+nvuillam@users.noreply.github.com>
Co-authored-by: nvuillam <17500430+nvuillam@users.noreply.github.com>
Copilot AI changed the title [WIP] Add windows-hide parameter for configuration Make windowsHide configurable to support Java UI dialogs Feb 7, 2026
Copilot AI requested a review from nvuillam February 7, 2026 10:19
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
⚠️ ACTION actionlint 4 3 0 0.44s
✅ COPYPASTE jscpd yes no no 1.68s
✅ JAVASCRIPT eslint 11 0 0 2.31s
✅ JSON jsonlint 7 0 0 0.17s
✅ JSON npm-package-json-lint yes no no 0.49s
⚠️ JSON prettier 7 1 0 0.46s
✅ JSON v8r 7 0 0 12.49s
⚠️ MARKDOWN markdownlint 6 17 0 0.81s
⚠️ MARKDOWN markdown-table-formatter 6 1 0 0.27s
✅ REPOSITORY checkov yes no no 20.63s
✅ REPOSITORY gitleaks yes no no 0.58s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 39.44s
✅ REPOSITORY secretlint yes no no 1.02s
✅ REPOSITORY syft yes no no 2.07s
✅ REPOSITORY trivy yes no no 9.68s
✅ REPOSITORY trivy-sbom yes no no 0.72s
✅ REPOSITORY trufflehog yes no no 4.72s
✅ SPELL cspell 40 0 0 3.58s
⚠️ SPELL lychee 23 2 0 1.52s
✅ TYPESCRIPT eslint 1 0 0 1.48s
⚠️ TYPESCRIPT prettier 1 1 0 0.46s
⚠️ TYPESCRIPT ts-standard 1 1 0 0.47s
⚠️ YAML prettier 8 1 3 0.44s
✅ YAML v8r 8 0 0 6.47s
✅ YAML yamllint 8 0 0 0.4s

Detailed Issues

⚠️ ACTION / actionlint - 3 errors
.github/workflows/github-dependents-info.yml:54:9: shellcheck reported issue in this script: SC2086:info:1:15: Double quote to prevent globbing and word splitting [shellcheck]
   |
54 |         run: sudo chown -R $USER:$USER .
   |         ^~~~
.github/workflows/github-dependents-info.yml:54:9: shellcheck reported issue in this script: SC2086:info:1:21: Double quote to prevent globbing and word splitting [shellcheck]
   |
54 |         run: sudo chown -R $USER:$USER .
   |         ^~~~
.github/workflows/test.yml:78:11: input "file" is not defined in action "codecov/codecov-action@v5". available inputs are "base_sha", "binary", "codecov_yml_path", "commit_parent", "directory", "disable_file_fixes", "disable_safe_directory", "disable_search", "disable_telem", "dry_run", "env_vars", "exclude", "fail_ci_if_error", "files", "flags", "force", "gcov_args", "gcov_executable", "gcov_ignore", "gcov_include", "git_service", "handle_no_reports_found", "job_code", "name", "network_filter", "network_prefix", "os", "override_branch", "override_build", "override_build_url", "override_commit", "override_pr", "plugins", "recurse_submodules", "report_code", "report_type", "root_dir", "run_command", "skip_validation", "slug", "swift_project", "token", "url", "use_legacy_upload_endpoint", "use_oidc", "use_pypi", "verbose", "version", "working-directory" [action]
   |
78 |           file: coverage.lcov
   |           ^~~~~
⚠️ SPELL / lychee - 2 errors
[403] https://www.npmjs.com/package/java-caller | Network error: Forbidden
[403] https://npmjs.org/package/java-caller | Network error: Forbidden
📝 Summary
---------------------
🔍 Total...........64
✅ Successful......16
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded........46
❓ Unknown..........0
🚫 Errors...........2

Errors in README.md
[403] https://npmjs.org/package/java-caller | Network error: Forbidden
[403] https://www.npmjs.com/package/java-caller | Network error: Forbidden
⚠️ MARKDOWN / markdown-table-formatter - 1 error
1 files contain markdown tables to format:
- README.md
⚠️ MARKDOWN / markdownlint - 17 errors
CODE_OF_CONDUCT.md:58:44 error MD034/no-bare-urls Bare URL used [Context: "nicolas.vuillamy@gmail.com"]
CODE_OF_CONDUCT.md:71:14 error MD034/no-bare-urls Bare URL used [Context: "https://www.contributor-covena..."]
CODE_OF_CONDUCT.md:76:1 error MD034/no-bare-urls Bare URL used [Context: "https://www.contributor-covena..."]
README.md:67:13 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
README.md:67:27 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
README.md:67:37 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
README.md:67:47 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
README.md:67:1 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
README.md:67:13 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
README.md:67:27 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
README.md:67:37 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
README.md:68:361 error MD055/table-pipe-style Table pipe style [Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe]
README.md:70:123 error MD060/table-column-style Table column style [Table pipe has extra space to the left for style "compact"]
README.md:74:315 error MD055/table-pipe-style Table pipe style [Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe]
README.md:75:310 error MD055/table-pipe-style Table pipe style [Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe]
README.md:76:208 error MD055/table-pipe-style Table pipe style [Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe]
README.md:77:233 error MD055/table-pipe-style Table pipe style [Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe]
⚠️ JSON / prettier - 1 error
Checking formatting...
[warn] .cspell.json
[warn] .vscode/launch.json
[warn] examples/cli_app/lib/java-caller-config.json
[warn] examples/cli_app/package.json
[warn] examples/module_app/package.json
[warn] package.json
[warn] renovate.json
[warn] Code style issues found in 7 files. Run Prettier with --write to fix.
⚠️ TYPESCRIPT / prettier - 1 error
Checking formatting...
[warn] lib/index.d.ts
[warn] Code style issues found in the above file. Run Prettier with --write to fix.
⚠️ YAML / prettier - 1 error
Checking formatting...
[warn] .github/workflows/deploy.yml
[warn] .github/workflows/test.yml
[warn] Code style issues found in 2 files. Run Prettier with --write to fix.
⚠️ TYPESCRIPT / ts-standard - 1 error
Unable to locate the project file. A project file (tsconfig.json or tsconfig.eslint.json) is required in order to use ts-standard.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.3.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,COPYPASTE_JSCPD,JAVASCRIPT_ES,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,JSON_NPM_PACKAGE_JSON_LINT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_CSPELL,SPELL_LYCHEE,TYPESCRIPT_ES,TYPESCRIPT_STANDARD,TYPESCRIPT_PRETTIER,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security

@nvuillam nvuillam marked this pull request as ready for review February 7, 2026 10:24
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.64%. Comparing base (11aae02) to head (d9ada8d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
+ Coverage   89.38%   89.64%   +0.25%     
==========================================
  Files           3        3              
  Lines         245      251       +6     
==========================================
+ Hits          219      225       +6     
  Misses         26       26              
Flag Coverage Δ
unittests 89.64% <100.00%> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nvuillam nvuillam merged commit 6afe7e9 into main Feb 7, 2026
48 checks passed
@nvuillam nvuillam deleted the copilot/add-windows-hide-parameter branch February 7, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regarding configuration issues

3 participants