A Scala/Java media framework? - java

I had the idea to start investigating in creating and using media components in Java but I didn't find any convincing framework. The two that I found were
Java Media Framework (JMF) : it seems so powerful, not so fast but the last update was in 2003.
Java Media Components (JMC) : from what I found, it's easier to use than JMF but it's more limited too.
So I just wanted to know wich of these frameworks should I choose ? Are there any other options ? And can they be used from a Scala-Swing application ?
Thanks

In my experience all existing media frameworks for Java suck big time.
What looks very promising in this area is JavaFX. And it integrates with Swing pretty well.
I have no doubt that it will work with Scala too (even though I haven't tried).
My suggestion would be to investigate JavaFX for any media related work for any JVM based languages.

The JMF is easy to use, there's a book about JMF programming in pdf online google it and download it. It's very flexible and using JNI ( Java Native Interface ) you can created .d or .dll files and link them into the JNI JAR Class Library and then make your scala, c++, assembly code work, it works great with GNU C++, especially on the Cygwin platform.
Note JMF is 32-bit only, so download the 32-bit JRE and JDK for it.

Related

Can I use Ruby or Python library in Android Java application?

Let's say I want to write a poker app for Android.
It is fine to use APIs in Java. But when it comes to heavy usage of arrays, sets, combinations etc Java becomes a huge pain for me. It's much easier to code poker AI in Ruby/Python IMHO.
So the question: is there a way to use either Ruby or Python functions in Java Android Application? It should be packed in .apk of course.
UPDATE: Regarding Ruboto: As I understand from this link https://play.google.com/store/apps/details?id=org.ruboto.core&feature=more_from_developer#?t=W251bGwsMSwxLDEwMiwib3JnLnJ1Ym90by5jb3JlIl0. ruboto-core needs to be installed on device to run ruboto apps =( It's no good if I'm going to share my app on Google Play.
How about JRuby? It's an open-source implementation of Ruby on top of Java that lets you use the JDK libraries. You could embed a JRuby instance into your app and run your logic using that.
Also see Jython
Have you tried Ruboto?
It claims to run Ruby scripts in Android devices!
There's this that might help you though, scripting Layer for Android SL4A found here, Though am not sure exactly how you'd integrate it with Android SDK :)
Actually, on reading the wiki, in the FAQ and quote:
Can I use SL4A to write a real Android application or embed SL4A
scripts in my application? Yes! You can embed your script in a
(mostly) stand alone APK.
Here is python-for-android, which let you include a python distribution in your android application, the distribution could include module you want to use.

Python in Desktop Application Development

My company is revamping the IT infrastructure and systems, so we are at the middle of finalizing the technology for developing the new system.
We have come to two candidates; Java & Python.
The main criteria of the choice is the language must be complete; in a sense that it must be able to use for web & desktop applications development. Java is proven is this field, with many good web framework (JSF, Hibernate, etc) and relatively good GUI library (SWT, Swing).
However, Python looks more delicious as from my personal experience, development in Python is efficient, I could do more with less time (I only have experience in web development with Django). However, as for the desktop application, I have yet find any good GUI library that comes integrated with the IDE as Swing.
Can someone points me the best if possible GUI framework for desktop application for Python?
For Python GUI, there are 3 main options:
wxPython
PyQt
PySide
(PySide is a derivation of PyQt).
For building the interface, you can use wxGlade for wx, and the packaged QtDesigner for PyQt/PySide (Which both can convert the .ui files to .py
All 3 use native OS widgets, so will look right at home.
Despite having more experience in wx, I actually prefer PyQt, as I find it's a lot easir to work with.
For an integrated IDE for developing Python GUI apps, there aren't any (afaik) complete apps, however, I personally use PyDev in Eclipse, which can handle opening .ui files in QtDesigner for you, which you'd save, run the tool to make a .py file, and it'll work pretty much flawlessly.
It is entirely possible to build a SWING GUI application with Python. Look for Jython, which is Python for the JVM. Any pure Python (no compiled C code) libraries for Python will work with Jython including most of the Python standard libraries.
Also, because Jython is a JVM language, it has access to objects provided by Java libraries such as SWING, and also can use the JVM threading model. Multithreading in plain Python is difficult due to the Global Interpreter Lock. Jython does not have that limitation.
If other people in the company are leaning towards Java, then Jython with SWING would be a safer choice because when people say that you should have used Java because Cool Library X is available, you just smile and say that Jython can also leverage Cool Library X because Jython is a JVM language.

ADF Scan Application: Which Library?

I need to develop a custom scan application. Up to now I used
old code: tcl/tk and a lot of subprocesses using the command line
interface of the sane project. The app only runs on linux with
an attached Fujitsu ADF scanner.
The code needs to be replaced with a modern solution. We prefer Java or Python
as language.
It would be good if the application could be used on MS-Windows and Linux.
In the past we had problems with hardware support of the sane library. Now we would
like to use TWAIN. There are some open source libraries or applications, but they
all look dead. But AFAIK TWAIN does not work on linux.
Up to now I only used open source stuff (python, linux, django, postgres) but maybe
it is better to buy a commercial library here.
There are some browser plugins, but I think a native GUI would be better.
Does anybody have any recommendations?
Try EZTwain Pro, http://www.eztwain.com/eztwain4.htm
Has python support, or java, and is actively supported. I should add I do work for the company that sells it.

How can I create a .msi file for a Java program ? (eclipse)

I have a java project which I'm hoping to package and sell. How can I create a .msi file which will install my program on other windows computers?
If there are any tutorials, please direct me to them. I'm also using Eclipse if that has any bearing on how to create the .msi file.
Thanks
I've been using WiX extensively for creating MSI packages. It has quite a steep learning curve, but once you know what you're doing, it is very powerful. You said earlier that it needs Visual Studio installed, but I think it's just .NET 3.0, not the whole IDE.
I used this WiX tutorial when I got started, and it's got pretty much everything you need in there if you want to go down this route.
If you're after something simple, search for a tool called WixEdit on SourceForge. This has a GUI for building MSIs - it's not perfect, but pretty easy to use and produces professional results.
I'll repeat, WiX has a very steep learning curve, and if you're just after a simple way to package your application, NSIS might be easier; or, you could use the standard IExpress.exe tool built into Windows to create a self-extracting .exe (but they don't "feel" as good as an MSI).
There's nothing special about Java apps when it comes to creating MSI's other then you have to make sure you have a JVM/JRE installed just like you have to make sure the .NET framework is installed for .NET applications.
Your question is too broad to be able to answer. Implicit in your question is "What tool should I use?" and once that's decided "How do I make an MSI using this tool?"
For the first question, check out:
Windows Installer Authoring Tools for Developers
Use NSIS: http://nsis.sourceforge.net/Main_Page . It creates executable file that will do the same thing, and it is free.
If you specifically want to create an MSI package, and assuming you don't want to pay for something like InstallShield, look at Wix. http://wix.sourceforge.net/
I believe you want to look at Native Packaging, which according to this link was first introduced with JavaFX 2.2
https://netbeans.org/kb/docs/java/native_pkg.html
Since it seems to be official Netbeans docs, I imagine it is sanctioned by Oracle. Here is the counterpart for Mac for interested readers.
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html

DId Quicktime 7.6.5 Windows fix QT for Java? Best video for JavaFX?

Greetings,
I have read that QuickTime for Java is esentially broken on both Windows 7 and Snow Leopard. I can't tell how broken -- doesn't seem broken, but could just be my setup. I'm trying to determine whether this is a good technology stack, or if I should look elsewhere.
Objective: I want to build a specialized desktop video player and annotation program for both Mac and Windows (and Linux if possible). I think I want to use JavaFX (JavaFX as a Flash/Flex alternative that can use all Java libs and can build a decent UI.) I need to use something like QuickTime vs. Flash video as I need frame-accurate playback and wide codec support. I'd prefer to code in a relatively high-level language (not C++).
Thanks,
Cameron
Apple seems to have abandon QT for Java. Wikipedia's QuickTime for Java page seems to sum it up well. A select quote:
Currently most of QTJ is broken on
recent windows-running computers.
Windows machines that use the
no-execute (NX) page-protection
security feature of recent CPUs cannot
run even the demos without changing
the configuration. This can be easily
verified by a developer via a test-run
of one of the demos coming with QTJ.
An "execution protection violation" is
reported and the program is aborted by
Windows. This renders QTJ unsuitable
for end-user application development
due to the necessary complicated
configuration of the NX feature.
So, not good.
Following the 2003 release of QTJ 6.1,
Apple has made few updates to QTJ,
mostly fixing bugs. Notably, QuickTime
7 was the first version of QuickTime
not to be accompanied or followed by a
QTJ release that wrapped the new
native API's. QuickTime 7's new API's,
such as those for working with
metadata and with frame-reordering
codecs, are not available to QTJ
programmers. Apple has also not
offered new classes to provide the
capture preview functionality that was
present in versions of QTJ prior to
6.1. Indeed, QTJ is dependent on some native API's that Apple no longer
recommends, most notably QuickDraw.
And probably not going to look good. Ever.
Have you tried Xuggler? It should work for you.

Categories

Resources