First of all, I have to precise that I am a 2d year bachelor student, so I'm still learning computer science and I'm not an expert. I have to implement a java program that can control VLC (tells it to play, stop etc.) while VLC is already running. My problem is that I can't figure out what APIs or java classes I should use in order to access VLC from my application. Since I didn't know where to start, I made quite a lot of researching and I bumped in some possibly interesting things:
firstly I thought Java Media Framework could help, but it seems that its purpose is to create kind of a fake graphical player with which you can stream multimedia files inside the java app, but that's not what I need
then I found out such VLCJ that seems to be what I need, but I still didn't get how it is exactly and how it works
So now my question is: is this VLCJ the right way? And in this case can someone please explain me how to use it or at least suggesting a point where to start? Should I use Runtime and Process classes to connect to VLC?
Otherwise, if I'm on the wrong way, are there any other solutions suitable for my problem?
PS: I also read something about a Remote Control Interface, but the explanations I've found are about some graphical content and not so clear, so I haven't gone deeper with that.
Related
I have been working on a project alone for more than two years for a company. The project is a really big one using rxtx to communicate with a hardware device. I used Java 8 and JAVAFX for the UI. Now it is almost finished and I am starting to search how to deliver the end user application that the company will distribute over its clients.
The problem is that the company I am working with wants the code to be non reachable when the software is between final clients hands because the Java code contains some extremely sensitive information that could have very bad consequences for the company if final clients happened to know them. The clients can literally perform actions they don’t have the right to perform.
So after searching (a lot) and thinking relatively to my case, I understood that giving a JAR obfuscated isn’t the solution. I then tried to generate a JAR and then transform it to an EXE but all I succeeded on was wrapping the JAR into EXE which does not prevent extracting the JAR and then seeing all the code easily. Finally, I found that I should use AoT compilation like GCJ compiler to produce native binary exe from my Java code but here I am stuck because after watching videos and reading articles etc I didn’t manage to find a clear way to produce the native binary exe.
I am now confused since I don’t know if I am on the right path and good direction or if I am totally wrong and there is another way of protecting the code (at least from non professional hackers, I understand that it is not possible to make it 100% safe but I am just searching for a reasonable and good way). How should I manage this final step of my work?
I currently work for a company that has code that we don't want anyone to have access to for the security of our clients and-- less important-- for legal reasons. ;-)
One possible solution you could look into would be to rewrite the code you deem most sensitive into a C/C++ library. It would be possible to compile this into a .so/.dll/.dylib file for the respective OSs and it would make it difficult, not entirely impossible, but difficult to decompile.
The trouble would come from learning how to access native code from Java as much of the documentation is not helpful or just simply nonexistent. This would utilize the Java Native Interface (JNI) which allows Java to, well, interface with the native (compiled C/C++) code. This would make it possible to create a Jar file that would effectively become a Java library for you to access throughout the rest of your project. The native code, however will still need to be loaded at runtime, but that's apart of learning how JNI works. A helpful link I found for JNI is http://jnicookbook.owsiak.org/ (for as long as it's still a functional link).
One of our clients here where I work has a project written in Java and needed to implement our code that is unfortunately all written in C. So we needed a way to access this C/C++ code from Java. This is the way we went about solving this issue without rewriting our code in Java. But we had the benefit (?) of having already written our code in C.
This solution to write a bunch of extra code last minute in another language that I may or may not be familiar with doesn't sound like particularly fun time.
I would be curious to learn what possible problems others might see with this solution.
I'm not good enough in java-programming, But i know its basics. My question is: Is it possible to run java application "java-applet" on explorer without java plugin "i mean java-platform"??
I ask this question -even it's stupid- because i see a lot of people not used java platform "java-plugin" on their explorers. Plus many people advice to not activate that java platform "java-plugin" on explorers. In addition, I think the message of permissions requirement make some people confused about application.
On anther hand, Is it possible to run java application by anther spread plugin such as flash player or anything else?? May be that is wrong question, Playing java by flash player, But i asked that to explain my question.
At the end, Is that possible or not? And if yes, What should i do to get that?
It is not possible. You need a Java Virtual machine coupled with the browser to run a java applet.
I have several VB programs that I wrote a few years ago in school. Is there any way possible to convert those programs to Java? Or would that it be easier to just rewrite it from scratch? My goal is to create an Android app that combines at least two of the programs into one functional app. This is purely a nonprofit endeavor; I'm a full time firefighter and am looking to put a free tool in the hands of my guys and other firemen who might want to use it.
I've been unable to locate the source code for the programs and have searched for an answer but haven't been able to find a definitive answer as most answers cover the source, not the compiled result. I've downloaded a couple supposed VB decompilers to see the results, but, in order to see the 'full' results, all the ones I've used require purchasing a 'pro' version. I have no problem paying for such a version, but I'd like to know if it's going to work properly before I do.
It would definitely be faster to rewrite them than it would be to devise a way of converting a VB program into Java code. Not only are the languages quite dissimilar, but VB's UI model is nothing like Android's, so it would likely be impossible (or at least impractical) to translate the UI code automatically.
After researching my options with regards to video support in Java, I stumbled across Java Media Components mentioned a few times, along with this article that seems to hint they hoped to include it in Java 7.
This originally looked great, so I set about finding it in Java 7 with the hope of including video support pretty easily. Needless to say I couldn't find it, and after Googling around all I can really find are half baked references to crow-barring part of the thing out of JavaFX.
So does anyone know what happened to it? Was it dropped along with lots of other features for Java 7 and pushed back to Java 8? Or dropped entirely? Or is it now just been integrated into JavaFX? The latter would make most sense to me, but the latest JavaFX release just claims to support FLV (at least at the moment) whereas the references I can find to JMC seem to point to it supporting a whole host of formats.
Long question short, does anyone know what's going on?
Its still there, but pretty much ignored. Much of the UI aspects in Java have moved over to JavaFX, not sure how it might be with Video though.
In reference to your question, here's a link to the current page on Oracles site. I believe it was always a separate download and still is.
hth.
I am going to create a Text to speech converter, which can be executed in both Windows, and Linux based systems. Can someone please help me answer the following questions;
What language should i use; Java, C++ or any other?
The program i am going to create should be able to read large chunks of data.
There should be good sound quality.
What are the libraries available to achieve this?
Please share your experiences as well.
Use the language you're most comfortable with. I learned the hard way when I tried to re-code my raytracer in C++, coming from a Python background. It took me weeks to get it to function...
Basically, you'll get frustrated by the nuances of a new language before you can get to coding something, so I suggest you stick with what you know.
That's independent of the language. Just makes sure to read the data in chunks (like 2048 kilobytes at a time). Reading a big file to RAM is not a great idea, as you can't be sure your end user has enough RAM (audio files can get BIG).
This is trivial. I can't help you program good sound quality. That's up to you.
There exist a few implementations of TTS for Linux, so that's all I can recommend. Look at Festival, as it is one of the ones you can actually understand.
Long time ago i had that same idea. I think it is not too complicated and can be done. This is how i would do it:
1- I would use Java, because it is platform independent.
2- If you are going to create an standalone application, it will be the local computer that will do the processing an not an application server, as in the case of web apps. Also i suppose that your program, will be used only by one user at a time. I think you will not have big issues with the amount data to process, if u implement some buffering mechanism.
3- The quality of the sound will depend in various factors such as: noise when recording,format, speed of the sound... Notice that many text to speech applications that exist on the web, the sound quality is ok, but you will never get the feeling that it is a real person, who is reading. (I recommend you a female voice, it sounds better).
4- Regarding to the libraries and another gadgets, this is what i think you might need:
-Java Standard Development Kit(To be able to work with java)
-A good IDE: There a many out there you can get for free. My favourite is eclipse but if you are a beginer with java, you might like to start with netbeans many people say it is more intuitive for learning.
-JLayer Mp3 library This will help you play the sounds in java.
-javax.swing Is a java library that is included in the development kit and allows you to create rich graphical user interfaces. Also if you are new to swing, i would recommend you a great swing IDE, called JFormDesigner, have a look at it, im sure it will speed your development alot(It is a great tool).
I hope my answers can give you some tips.
Update
I think it would be correct to mention also, that the only minimum requirement the users of your app will have in order to run the app is:
JRE(Java runtime enviroment)
This project of text to speech can be made using computer generated voice
so no problem of storing a database for each word and its pronunciation.
Just use the language in which u feel master to urself and apply the concept.....
I do not know anything about text to speech except that it's not easy. That being said, I suggest you stick with the language you are most familiar with. I'm sure Java and C can do it.