Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I just want to know how to do multithreading using java in MATLAB? I know there is parallel computing toolbox in MATLAB by this one can implement parallel computing and in JAVA by extending Thread Class we can do multithreading.
I want to execute multithreading using java code in MATLAB without using PCT of MATLAB? Please provide a code if possible.. I studied several literature but still can't be able to execute even a single program of java using MATLAB.. Thanks in Advance!!!
You could try reading through the example from this article on the Undocumented MATLAB blog, which illustrates calling threaded Java from MATLAB. It's one of a four-part series discussing several other ways of implementing threads, including .NET and MEX.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm trying to decide if JNI is for our use case.
We have a library written in C++ that fetches data from Database/RPC using multiple threads, and we want to create a wrapper to let Java code be able to call it.
I'm not familiar with JNI, so I would like to know if C++ multithreading will still work properly in this case.
Thanks.
I don't see any major issues in neither direction. Unless you have something really specific.
Here you have sample that calls JNI code from multiple threads:
http://jnicookbook.owsiak.org/recipe-No-024/
Here you have sample that calls Java from multiple C threads:
http://jnicookbook.owsiak.org/recipe-no-027/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am coding UI by javaFx in eclipse
because I can only use java, no python, no c.
Now I try to use trained tensorflow file in this UI. (this tensorflow file is under python)
I am looking for several ways (API, jython, TCP/IP) but I am not sure which one is best.
Please write your opinion which has more advantages or fewer disadvantages.
I think there are two ways for that,
tensorflow-serving which uses grpc to connect from java to the serving server, making it independent of any language. Look here for details.
Use tensorflow java API. Here and Here is an example of using object detection model in native java program.
Now, tensorflow-serving is the preferred way to go, as there are several advantages. Serving is heavily optimized for speed and resource management like GPU. It also stacks multiple requests (if there is too many) and then processes them in a batch which utilizes the GPU efficiently.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
What is the most efficient way of passing data from C++ to Java?
The Java application will need to call the C++ application to retrieve the data.
I can see the following ways of achieving this:
Using JNI
Using a file based approach
Using SWIG
My current thinking is to use JNI. AM I missing a better method before I commit?
Java Native Interface allows you to pass anything back and forth between C++ and Java. It supports both directions, but can be tricky. There are others you can look at Swig is one and then you have JNA. I would go with JNI
JNI would be the best approach. Notice that javah creates compatible header-files for your java-class, its very tricky to to write compatible header-files by your own, so please use javah.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have written an RTMPS client a while back and needed it for my Django application but since Java and Python don't play well without using system calls (I don't want to use Jython) I wanted to rewrite the application in Python.
Would it work if I ported it as if to Python from Java? Of course we have to take into account the obvious things like multiple constructors have to be done differently in Python. Are there any other things that would not make it work in Python?
I am doing this because Java is so memory heavy and hoping that moving in into Python would reduce memory footprint and thus allow my web app to use it.
I would suggest rewriting it completely but there are a lot of differences to take into account. Here's a starter for recognizing some of the common differences/mistakes: http://dirtsimple.org/2004/12/python-is-not-java.html
Also if you are too lazy to rewrite the code (like me) there is an other option: java2python
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
can you give me few specific cases when using "streams" in Java 8 would be the best solution?
I did a lot of research on the internet but I couldn't find any specific cases...
Thank you in advance.
Many examples are provided in java.util.stream's package summary.
RTFM. ;)
Currently we all are moving towards BIG DATA and Real Time no wonder if Java also starts thinking in that aspect. Java 8 Streams would empower the entire working model of Java Collections. Streams would help us processing huge amount of data (may be something like infinitely running streams) in parallel.
I have been blogging a Series of article on Java 8 Streams API. Please do visit for more information amitph.com > Introduction to Java 8 Streams API