Run Java ScreenGrabber example - java

I'm trying to test the Screen Grabber sample from JMF. Could anyone tell me how to write the main method to run this example?.
I have reviewed a lot in Google and have not found a way to make it work. because I do not know which of the two classes (LiveStream or DataSource) I must to use in the main method.
otherwise, I tried running the command:
java JMStudio screen://0,0,160,120/10
But it shows me the following exception:
UNABLE_CREATE_PLAYER*javax.media.NoPlayerException: Cannot find a Player for :screen://0,0,160,120/10
Thanks for the help.
Greetings!

Don't.
JMF never really worked out and has been abandon. (Google: "JMF is dead".) Find another mechanism for screen grabbing.

it's a late answer, but with the same hopes as Lobo, i'd like to add some constructive info :
1) JMF is old but also an old gun. it's working
2) it's pure Java, and if you are a Java guy, it will be helpful, this way or that way
3) use the methods you mentioned, if you can. follow the tutorial. otherwise, there is a free package that can be downloaded from http://www.kemottron.com, MODERATOR-CONFERENCE, you can try. pure Java, and it captures your desktop and broadcast to the Internet.
regards,

Related

Using ops from Tensorflow.contrb on Windows via Java API

I would like to load an op from tf.contrib, specifically "_beam_search_ops". I use Tensorflow 1.6 from Maven.
Following the answer at Issue while loading/serving tensorflow model in java using estimators , I'm able to do so on Ubuntu 17.10.
The code looks like so:
TensorFlow.loadLibrary("_beam_search_ops.so");
Then I try to do the same in Windows 10 with code
TensorFlow.loadLibrary("_beam_search_ops.dll");
And it fails with
java.lang.UnsatisfiedLinkError: D:\Users\ALEXAN~1\AppData\Local\Temp\deep_api_plugin\_beam_search_ops.dll not found
at org.tensorflow.TensorFlow.loadLibrary(TensorFlow.java:47)
So what is the reason for this?
While I was writing and researching the question, I've stumbled on the solution.
In order to resolve the problem, a _pywrap_tensorflow_internal.pyd file should be copied to the folder where _beam_search_ops.dll resides. I understand that this is also some kind of dll, but do not understand why it is necessary for Windows and not for Ubuntu. If anyone happens to know, please enlighten me.
Also I understand that this sort of additional information should be provided in a comment to the original answer, but unfortunately I do not have enough reputation to comment and thought this answer could help someone.
Edit: I was too quick to celebrate. With this answer a library is loaded without exception, but the model cannot seem to use it, failing with
Exception in thread "main" org.tensorflow.TensorFlowException: Op type not registered 'GatherTree' in binary running on DESKTOP-EB6GIDR. Make sure the Op and Kernel are registered in the binary running in this process.
at org.tensorflow.SavedModelBundle.load(Native Method)
at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:39)
Search for answer should continue.

How do I check a clients Java Version?

I want to create an Executable Jar file that when run, checks the currently installed version of Java on that computer and displays it for the user. I have searched online but in vain, I cannot find any code that allows a Jar file to check. I know that the Java website has it ( http://www.java.com/en/download/installed.jsp) I can't find a way to replicate it in Java Code. Any help would be very much appreciated.
Note: Sorry if this question is really stupid and has a really simple answer... I just spent half an hour trying to find a solution and I couldn't so I need your help! Thanks
Edit: I don't need the code for displaying it, just to get the version is enough for me thanks!
System.getProperty("java.version");
Calling System.getProperty("java.version"); will give you version of the installed JRE which is what you want. Also take a look at other System properties, you may find some of them also useful.

How to use FreeTTS in IntelliJ IDEA

I need to use FreeTTS in a Java program. It's a really small application that just speaks out a certain text that was typed in by the user. I have no idea how to get this work though... I have downloaded the .zip from the FreeTTS site ( http://freetts.sourceforge.net/docs/index.php ), but how should I proceed to get it to work? As IDE I use IntelliJ IDEA. Could someone help me get to how to use it? I've never really manually added something to use in applications, I wonder, when it's added, how it can be used in a program (via import?). I hope someone can help me here, thanks in advance.
Extra info: I'm using a Mac.

Where can I find "Device" file to add to EclipseME java project?

I installed JavaME and EclipseME, and I'm trying to make a Hello World to my Nokia5530. But the imports are not working.
This page says that I need a "Device" file, but I don't know where to find it.. any idea?
Since it appears no on else is helping with this, I will start an answer, and put in my last comment into here.
OK, you need to install the Nokia SDK and then import it, as explained here, though your phone may not be series 60, you will need to d/l and then import the appropriate nokia sdk version: http://wiki.forum.nokia.com/index.php/Installing_Java_ME_development_tools_for_S60#Configuring_EclipseME
I haven't tried the suggestions here as I primarily develop on Windows at the moment, but the idea of using wine to install the SDK, and then move the files to an appropriate place on Linux sounds like a reasonable suggestion. I don't know if the suggestion below of compiling it yourself would be useful, but, there were some suggestions in the link below that may help you solve this particular problem.
http://www.wirelessforums.org/alt-cellular-nokia/nokia-sdk-linux-8895.html

Can I directly use Java source code directly in SCILAB, or Is there another way to connect both?

a friend of mine uses SCILAB for doing his mathematicall "homework" for his studies and he told me, that it should be possible to use Java source code diretly in SCILAB.
The background is that I presented my current Java project and I would like to plot this in 3D, but I haven't done graphical output so far. And he proposed to let SCILAB do the 3D plotting, because there are some ready to use plot scemes implented. But he couldn't tell me how to achive this, so that's why I'm here :).
So my first question is, if this is possible to directly use Java source code in SCILAB or at least to some kind of connection between both?
And how this is done! :)
Thank you in advance,
Andreas
in Netbeans first create a java project.
then go to properties of the project you have created and go to libraries..
in libraries "add jar"
now go to the scilab installed directory
scilab-->modules-->javasci-->jar
in that there will be jar file names javasci.jar
add this to library..
and you are done.
now go to your main file and check out import javasci.*;
and in main function
Scilab.exec("plot2d(1,3)");
you can see a scilab window
at least I found this http://www.scilab.org/product/man/compile_and_run_javasci.html
so it is possible, but I have some problems to get this to work in netbens and eclipse.
has anyone done this before?

Categories