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

External and native libraries #1

Closed
VaneskaSousa opened this issue Apr 16, 2020 · 8 comments · Fixed by #21
Closed

External and native libraries #1

VaneskaSousa opened this issue Apr 16, 2020 · 8 comments · Fixed by #21
Assignees
Labels
feature

Comments

@VaneskaSousa
Copy link
Collaborator

VaneskaSousa commented Apr 16, 2020

One of the TotalCross developers most requested features is the possibility of using native and external libraries within their applications. This functionality is extremely important for several reasons, among them, being able to use serial ports like RS232, access peripherals, and perform hardware analysis. It is our number one priority.

To implement this, we divided it into two macro activities:

  • Create a new method based on the runtime.exec of java;
  • Improve TCNI for community use;

Please, feel free to contribute with your questions or suggestions!

@VaneskaSousa VaneskaSousa added the feature label Apr 16, 2020
@ricardobna
Copy link
Collaborator

ricardobna commented Apr 21, 2020

I am working on Runtime.exec, so far I've done FileInputStream on C side, just need to figure out a way to properly read the stream to run some tests.

@ricardobna
Copy link
Collaborator

ricardobna commented Apr 21, 2020

I got to read a file on C and stream it to a Process on Java with FIleInputStream. This allowed me to run some tests with reading a file and printing its contents with println.

@ricardobna
Copy link
Collaborator

ricardobna commented Apr 22, 2020

Finished the Output and Error streams bindings, still need to run some tests on linux with exec.

@ricardobna
Copy link
Collaborator

ricardobna commented Apr 24, 2020

Finished testing for linux Runtime.exec should be working on feature/runtime-exec branch. As a side note, passing a file won't change anything as of now, as it's not yet implemented, we will be looking to implement this part at a later stage of development of this feature.

@ricardobna
Copy link
Collaborator

ricardobna commented Apr 24, 2020

Just finished the Java interface and the File path, now you can do exec("command") and it should work just fine.

@ricardobna
Copy link
Collaborator

ricardobna commented Apr 27, 2020

Added destroy, exitValue and waitFor methods today, also added some exceptions to these methods, all changes are on feature/runtime-exec

@ricardobna ricardobna linked a pull request Apr 29, 2020 that will close this issue
@ricardobna
Copy link
Collaborator

ricardobna commented Apr 29, 2020

Finished Runtime.exec, the calls are the same as Java's and the changes can be found on feature/runtime-exec branch or it's pull request #21.

@pattrickx
Copy link
Collaborator

pattrickx commented May 6, 2020

Runtime.exec does not terminate processes when the application window is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants