I'm using JMF in my Java GUI and before downloading the packages from Oracle, it asks you which version you want:
Linux
Solaris SPARC
Windows
Does this mean my Java (cross-platform by nature) application WON'T be cross platform any more?
There is a 100% pure Java implementation, but that does not support all codecs and doesn't run as efficiently as the version using native code. So, effectively, the JMF is not fully cross-platform.
The developers justify this by considering the JMF an extension to the Java platform itself rather than just a library: just like you have to download a specific JVM for your platform, but can reuse your source and object code unchanged, you need a platform-dependent JMF implementation, but the JMF clients can be reused unchanged.
JMF isn't a pure Java API, so it'll only work where it's officially ported.
Related
I'm interested in writing games in Java and wondered if Minecraft is written purely using the standard JDK or whether it uses open source (or commercial for that matter) libraries.
Yes. Minecraft uses the LWJGL library for graphics and sound.
It uses Java Game Controller API jinput as well from here
From what I understand, Blackberry Java Runtime runs micro-java runtime.
Which is based on Java 1.3. (thanks Andreas_D)
Blackberry supplies a few alternatives, or the micro-java supplies some alternatives.
But its such a pain. We have an App that uses android java, of which supports full Java 1.6. We were hoping for a conversion of the UI components, but now have to rewrite code?
Is there an easy way to over come this problem?
I cant get a java.io.File for example. And its not the only one..
Are there alternatives for :
java.io.RandomAccessFile
java.io.File
java.io.FileOutputStream
Missing a bit? Yes if you're comparing it to a full Java SE / EE implementation. No if you're comparing it against the Java ME reference implementation.
Java ME (J2ME) doesn't contain all the API classes you may expect in a full Java SE platform - it was never intended to. Also, mobile devices need to be able to grant and revoke specific permissions to applications etc.
Remember it's a deliberate subset for devices with limited resources and the omissions are pretty well documented. For example, file access in Java ME is done via file connection api:
File Connection API
Also see these sites (for other/general differences):
Differences between Java SE, EE and ME
Difference between Android and Java ME development
Differences between programming for a J2ME JVM, and programming for a J2SE JVM
Java ME Wikipedia Page
Java ME CLDC - Noteworthy limitations list at Wikipedia
Blackberry supports Java 1.3, not 1.4.
The cleanest way to get around those missing File-related classes would be to write some wrapper classes which just expose the functionality you need, then you can write implementations for BlackBerry using whatever's available via the J2ME and BlackBerry APIs.
Alternatively, you could just write your own versions of java.io.File etc for BlackBerry, and include those in your project. If you take this approach you'll need to be very careful to mimic the behaviour exactly or you could be opening yourself up to a whole new world of painful bugs.
There may well be libraries out there for BlackBerry which do what you want, I'll leave it up to you to do some googling on that...
https://www.tizen.org/ Tizen Mobile & IPad Linux very exciting.
Its allowing GCC. But does it run Dalvik JVM or OpenJDK?
Will then it will be compatible with 32-bit or 64-bit compilers?
Or we need to convert our source to be re-compiled using ARM compilers? of GCC?
Will it be easier to port C, Java code's now to Tizen? Where its complex and not natively available under Android phones/platforms?
As far as I know, it will be possible to package applications as DEB or RPM packages, you will be able to include an embedded VM (for example Avian VM) if you want, probably no JVM will be installed by default. JavaSE Embedded and OpenJDK should work (maybe with small modifications) under Tizen even though the documention only mentions C/C++ for native apps and HTML5/JavaScript for web apps. Moreover, there is no Java binding to its native APIs yet except those already available for Linux ARM and for APIs supported in any Linux distribution (for example JOGL 2.0). If you really need some help to use Java under Tizen, please contact the JogAmp Foundation here. Xerxes already succeeded in running JOGL 2.0 under Meego as you can see here, why not doing the same thing under Tizen?
N.B: Don't expect official Java support under Tizen.
If you check this two presentation from May:
Tips and Tricks: Designing Low-Power Native and Web Apps on page 3.
and this
Implementation of Standard Accessibility APIs for Tizen on page 9.
You see that basically Tizen will have two APIs and hence two types of applications:
Native;
Web(HTML5) pretty well documented already.
So no JVM or OpenJDK, don't know the Native API apps binaries will be compiled to but probably will know soon.
Since Tizen is pretty much in development you can check from time to time the official site.
On the sun Website, there have download options for windows, solaris, and linux.
http://www.oracle.com/technetwork/java/javase/download-142937.html
Check this page - http://www.oracle.com/technetwork/java/javase/setup-138642.html
JMF 2.1.1 -- A cross-platform version
of JMF for Java clients. To set up on
a Java client, you need to download
the Cross-platform Java install
package, which contains only Java
bytecodes (no native code). Note the
Java Sound API reference
implementation is not included with
the cross-platform version of JMF.
Select any platform and proceed to their page.... there you will get a link for a Cross-platform Java version jmf-2_1_1e-alljava.zip
There is an open-source framework called fmj. It supports linux, windows and mac. I gathered good experiences with this framework.
http://fmj-sf.net/index.php
In the world of Java, BEA (now Oracle) has created LiquidVM which doesn't require an OS. Likewise, there are a variety of open source projects including SANOS, JNODE OS, Project Guest VM, JavaOS, etc.
Is there an equivalent being created for .NET?
check out the .NET Micro Framework
unlike the projects suggested by Trillian which are projects to create a managed CLR OS (not what the question asked.) The .NET Micro Framework is the .NET CLR without an OS. It is commerially supported by microsoft and can be developed for using Visual Studio.
Some googling found out:
Singularity (a Microsoft research project)
Midori (another Microsoft research project, which aims to replace or integrate with a future version of Windows, especially on mobile devices)
SharpOS (an open-source GPL OS in C#)
Cosmos (an open-source BSD OS in C#)
As to how mature those systems are, you'll have to check by yourself ;).
Have you seen COSMOS?
Cosmos is an operating system project implemented completely in CIL compliant languages. The team is committed to using C#, however any .NET language can be used.
Also have a look at Singularity, a project from Microsoft Research