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

KNetCLI, KNetPS and KNetConnect does not recognize commands #482

Closed
masesdevelopers opened this issue Jun 5, 2024 · 3 comments · Fixed by #483, #497 or #501
Closed

KNetCLI, KNetPS and KNetConnect does not recognize commands #482

masesdevelopers opened this issue Jun 5, 2024 · 3 comments · Fixed by #483, #497 or #501
Assignees
Labels
bug Something isn't working KNetCLI KNetCLI related issue

Comments

@masesdevelopers
Copy link
Contributor

Describe the bug
When a command is requested using KNetCLI it is not recognized from the command-line

To Reproduce
Steps to reproduce the behavior:

  1. Open a command prompt
  2. Execute

dotnet tool install --global MASES.KNetCLI --version 2.7.2

  1. Execute

knet -ClassToRun ConsoleConsumer

  1. The help is shown

Expected behavior
The command shall be executed

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Version 10
  • KNet latest

Additional context
N/A

@masesdevelopers
Copy link
Contributor Author

masesdevelopers commented Jun 12, 2024

Reopen due to errors in string evaluation; the error reported is
Error: Object of type 'System.String[]' cannot be converted to type 'Java.Lang.String[]'.

@masesdevelopers masesdevelopers changed the title KNetCLI does not recognize commands KNetCLI, KNetPS and KNetConnect does not recognize commands Jun 12, 2024
@masesdevelopers
Copy link
Contributor Author

the error reported is Error: Object of type 'System.String[]' cannot be converted to type 'Java.Lang.String[]'.

The above error is not raised from every command, but only from Main-Class defining IJVMBridgeMain and implementing an explicit Main method: e.g. ConsoleConsumer does not raise the exception because it extends JVMBridgeMain, while AclCommand definesIJVMBridgeMain.
The problem is strictly related to the method Launch which does not manages other types than string, because the base Launch method (defined in JCOBridge) cannot understand Java.Lang.String since it is defined in JNet.
So, to solve the problem the Launch method shall be enhanced to identify the target type and convert inputs if needed.

@masesdevelopers
Copy link
Contributor Author

Revert code of #497 when a version of JNet contains masesgroup/JNet#451

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