In worst case you can implement your interaction in C/C++ modules for each supported platform and you can bind your native code to java via native method calls but thats a lot of work especially if you have a lot of different platforms to support. But you can reach any platform specific functionality from java if you are willing to write some platform specific C/C++ for it. In your case I would go with the sound api the guys already linked if its enough to get the job done.
Native methods in Java? I have to learn about them.
The master of the art of living makes little distinction between his work and his play, his labor and his leisure, his mind and his body, his education and his recreation, his love and his religion. He hardly knows which is which; he simply pursues his vision of excellence in whatever he does, leaving others to decide whether he is working or playing. To him he is always doing both.
You can declare a static or instance method in java and by applying the native keyword on it you indicate for the compiler that you will provide the implementation with native code, and not in java. Then you have to write a DLL (or more DLLs) that exports the native function(s) with the appropriate names. When you java program starts you have to load the needed DLLs with System.LoadLibrary() before you call the native methods. Example: http://www.javaworld.com/javatips/jw-javatip23.html[^]
I would note that you should always try to write as much code in crossplatform java as you can and don't use native methods if you can avoid them because platform dependent stuff defeats the purpose of java.
I have this very urgent requirement of developing a code that can extract .mp3 from .flv . I have had partial success in extracting raw bytes of mp3 from it . Now why is it that when i use something like
assuming that buffer contains all the bytes of extracted mp3 .
Can somebody perhaps give me an alternate approach which does not involve using ffmpeg . I just want to work with bytes (it's a requirement and also no external apis).
Hi all, I'm working on a linux machine and I'd like to show via web services architecture some informations collected via linux shell acting with command like top, or ps.
My aim is to expose via web services informations of some processes that are running on my machine and these informations are available only via shell commands.
Now: how can I do this in Java? Is Java yhe best choice?
1. Learn how to act as a client (in a client/server setup) to get to a web service.
2. Get the information out of the returned web service call.
3. Learn how to code console output.
4. Use 3 to print the information from 2.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
First you need to learn the basics of the language.. There are many of tutorials available but you might like to take a look at this online resource:
There is also the offical site:
The most important aspect when learning how to code in a programming language easily, quickly and effectively is writing the code YOURSELF, testing it and just play around with it by experimenting with changing the values and amongst other things.
My name is Azeem and i'm a student of computer sciences.
i need help about my project.
i am developing an application using optical character recognition (OCR) for android system Mobiles.
i have some difficulty in choosing tools for this.
what are the best tool for developing Android application.?
i want to know is Java suitable for OCR or C# is best for OCR ?
Can we convert the java program is Android Application ?
or can we convert the C# program is Android Application ?