Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Windows PowerShell not scanning the jar files #19

Closed
mahes97 opened this issue Apr 27, 2023 · 3 comments
Closed

On Windows PowerShell not scanning the jar files #19

mahes97 opened this issue Apr 27, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mahes97
Copy link

mahes97 commented Apr 27, 2023

Describe the bug

Tried jar scanning for org.eclipse.swt.win32.win32.x86-4.3.jar. It is working as expected in Linux and MacOS but on Windows (Windows Server 2022 Datacenter 64bit) it is not reporting the expected incompatibility.

Expected behavior

It is expected to report the incompatibility in the Windows PowerShell

Steps to Reproduce

Steps to reproduce the behavior:

OpenJDK 18 (I tried in 17 as well), Python 3.11.3, Maven 3.8.8

  1. Download jar org.eclipse.swt.win32.win32.x86-4.3.jar \testrepo
  2. python src/porting-advisor.py .\testrepo

This should report incompatibilities like this

testrepo/lib/org.eclipse.swt.win32.win32.x86-4.3.jar: JAR has native methods but no libraries found for aarch64/Linux. Native methods: static final native int org.eclipse.swt.awt.SWT_AWT.getAWTHandle(java.awt.Canvas),..........continued listing all native methods...

But if you run this in Windows, the above incompatibility is not getting reported instead it says below

| Elapsed Time: 0:00:08

Porting Advisor for Graviton v1.0.0
Report date: 2023-04-27 05:57:29

1 file scanned.
detected java code. we recommend using Corretto. see https://aws.amazon.com/corretto/ for more details.
detected java code. min version 8 is required. version 11 or above is recommended. see https://github.com/aws/aws-graviton-getting-started/blob/main/java.md for more details.

Report generated successfully. Hint: you can use --output FILENAME.html to generate an HTML report.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. Windows, macOS, Linux, etc] Windows
  • Version/Distro: [e.g. 11, Big Sur, Ubuntu 18.04] Windows 2022
  • Processor Architecture: [e.g. x86/x64, ARM] x64
  • Python Version: 3.11
  • Java Version (if applicable): 17,18

Additional context

Add any other context about the problem here.

@jamolina
Copy link
Contributor

@mahes97 thank you for your report. We'll take a look and figure out why this is not working as expected.

@jamolina jamolina self-assigned this Apr 27, 2023
@jamolina jamolina added the bug Something isn't working label Apr 27, 2023
@jamolina
Copy link
Contributor

@mahes97 we were able to reproduce the issue. We will ship a fix as soon as possible. As a workaround, you can run:

.\Build.ps1

Before running the script, this will allow the JAR scanning process to succeed on Windows.

@jamolina
Copy link
Contributor

@mahes97 the issue has been fixed. Thanks again for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants