I'm trying to port a JVM to my linux-arm based set-top-box, which can run a midlet, i.e. it should be based on the MIDP profile.
I've tried the phoneMe Feature, but failed. Is there any better porting solution? I need your HELP, thanks very much.
You can probably take JavaSE for embedded and combine it with microemu to get a MIDP environment.
Also check out Jalimo, it may provide an alternate.
Related
We a team of 10 people are set out to build an Operating System for mobiles/tablet from scratch.
I then came by this link awesome-link
which has a load of OS briefed. But we would like to build the OS in Java on top of linux kernel(possible?) .
I would like to know whether the project is feasible and if yes, from where should I start ?
And with all the knowledge and right resources(assume), will it be possible to build an OS with all the mobile functionalities within 6 months?
Any help is much appreciated. Thanks.
But we would like to build the OS in Java on top of linux kernel(possible?)
Yes, what do you think Android is made of (of course it's not just Java + Linux kernel, but both are inside Android)?
I would like to know whether the project is feasible and if yes, from where should I start ?
Ever written an OS? How well do you know Linux kernel APIs? Do you know what's missing from Linux kernel to build a full featured OS? Answer those, they're your starting point.
And with all the knowledge and right resources(assume), will it be possible to build an OS with all the mobile functionalities within 6 months?
"All mobile functionalities" is biased, what is "all"? Be specific.
Please make enough research and planning before you are set out to start such a difficult, yet excellent journey.
Make sure you know what you should do, right from the technologies you are gonna use, the architecture you are planning to establish upon, the pros and cons of all the approach, the issues with the current OS and your idea of correcting those issues.
With a site like SO for your help, it is never a question of feasibility, but you would require the determination and the perseverance to achieve it.
Finally, all the best!!
You have Android build on scaled down Linux Kernel and apk is build through java & sdk manager. So you have the things in your hand, similarly ubuntu touch is also coming. What you can do is to customize things as per your requirements as per your architecture.
For ubuntu touch :- https://wiki.ubuntu.com/Touch/Building
For Your own customized Android:- http://source.android.com/source/index.html
Thanks & Regards,
Alok Thaker
mY general question above and simple - can I compile Dalvik VM for WinCE? In particular, I want to run some android-compatible projects under WinCE 5.0. Obviously, it's sounds afraid, but interesting for me:)
I don't think it would help you. In fact, since the code is just Java, you could compile it for regular JVM and there are some for WinCE. The problem is you'd need the user interface and system libraries and porting those would be huge amount of work.
If you are writing the application, the best I can suggest is that you use some kind of portability layer. There are e.g. J2ME polish, LWUIT (Android port) and certainly more. With those you will be able to run on most mobile devices that have Java.
My Java program is in working order when i use it under Windows(Eclipse and Bluej). I compress it to a Jar and send it to my red hat and bang. nothing works. It breaks on the weirdest things, such as text field set text will not show, JPasswordfield just disappeared, Java AWT ROBOT dies too... the list goes on, first i thought it must be my Linux JRE is out of date, but i installed latest JRE then the JDK with no improvement at all. I have a feeling that i miss understood the Java cross plat ability. I also tried to remove all of my functions and guts to see what is breaking but it seems every second thing is breaking, other than the some of the major GUI components and most of the back end stuff. basically any thing that uses some thing fancy will blowup in my face, such as making a text field in to a password field...
This is my first time posting ;) please be nice to the newbie!
Thanks!!!
SOLVED!!!
Yay. Problem solved!!! It was because my Java path isn't set, so my GCC/GCJ jumped in instead of my oracle java, even tho i used java -jar xxx.jar. so I put in the java directory path from of my java -jar xxx.jar and worked like a charm. unless you set the path, you have have to do this manually
/usr/java/jdk1.6.0_21/jre/bin/java -jar xxxxx.jar
java -version to check if your real java is running or if it s still GCJ
Linux users often run java programs with gcj instead of java. Check that you use a correct executable.
Check that you are using Sun's (Oracle's) JRE on your Linux machine and not some 3rd party Java implementation such as gcj or the likes.
In my experience, Java applications are quite portable as long as you stick to the same JVM/runtime vendor on every target SO, but Java implementations from different vendors might behave different from each other.
Yes. The class and jar formats are intentionally crossplatform.
Are you absolutely certain that your jar file was copied correctly to your Linux machine? If you used ftp, it is crucial to use binary instead of ascii transfer.
Is your application dependent upon any external libraries that you also need to have available on your Linux machine?
Java says: "Write once, run anywhere".
Swing should be fully portable. Try using the metal look and feel, which is widely supported. I have my doubts about java.awt.Robot though and wouldn't be suprised if this was the source of your problems.
Are you using KDE? Which theme? I had an issue yesterday that the theme "Cleanlooks" has a lot of bugs rendering widgets. Try "Oxygen".
If you can, try the code on a different Linux box (maybe it has a hardware defect). Run "memtest" (should be an option in the boot loader or on your rescue CD).
I have a Swing app which I distributed via Java Web Start that I haven't updated since 2004 which I know still works fine on Mac OS X, Windows, and Linux. I ran it just the other day because somebody emailed me a question about it. It was originally written on Windows but has never shown any problems on other operating systems or even in much much later versions of Java.
The JVM presents a very level playing field across a wide variety of platforms and the Java API is well implemented to work the same and offer the same functionality. My bet is that you will find this problem is something entirely unrelated to your Java code. In addition to the suggestion to try your app on another machine running the same OS, be sure to try other people's Java apps running on the one which is giving problems. Try my own HotSheet: http://www.johnmunsch.com/projects/HotSheet/ or a game like Legerdemain: http://roguelikefiction.com/?page_id=6 to see if those will work.
On linux it might be crucial to use the Sun JDK/JRE and not the openjdk, which is an implementation of the official sun java jdk. So it could be that, though not sure at all.
Java is very transportable. Chances are your VM is different. Although the Open Source VMs are getting very good, I recommend trying with Sun's VM--I've never had a problem with it running any code.
Also, if you are using any libraries with machine language components, those will have to be different (I've noticed this with some graphics libraries that call through to the platform's 3d subsystem)
But Java itself WILL port easily to any system that has the same libraries and a good VM Very Well--I do it all the time and have been doing so for ten years and literally have never had a problem. This is running client/server systems where the clients and server were on different platforms, PC/Mac & Unix and even embedded systems--stuff just ports.
Now, applets running in different browsers, or visually trying to match fonts on machines that don't contain the same font--Nothing will help you there.
Is it possible to write a mobile application with J2ME and whenever we want to implement a functionality not offered by J2ME call native mobile API ? (kind of like what is done with .NET, whenever you need something not provided, you just call the Win32 API from the .NET platform).
While JNI is not officially supported in J2ME, the Symbian implementation of J2ME obviously uses something very similar.
Since most J2ME APIs have a corresponding Symbian OS C++ API, what Symbian did (a lot) is develop adaptation layers between the 2.
Between that and the new modular architecture of the IBM J9 virtual machine (from Series60 3rd edition feature pack 2 onward), it is technically possible to add a new API to the virtual machine without actually needing to recompile most of a handset firmware.
However, third party developers simply are not allowed to do it without a lot of help from the handset manufacturer.
A loopback socket connection is the solution that people have tipically implemented to transfer data accross the language barrier. Large-scale deployment is not the easiest task, though, as you technically need to install 2 applications on the device. Once you understand the threading model of the Symbian J2ME implementation, you also realize how ugly and inefficient a hack it is.
When you reach that kind of issue, it's time to learn Symbian OS C++ and do it right.
No. That's not possible with Java ME.
Only sort of. Actually it is possible but not directly. You can write a native server that listens on a local socket and send requests to it from your Java MIDlet. Someone even released a framework to do this called MIDP-JNI (as opposed to real JNI). Obviously the form of the solution imposes some limitations on what you can do with it but it isn't actually impossible.
Be aware that using this approach can make your application much more complex to debug.
If you are specifically looking out for Nokia/Symbian, then APIBridge http://wiki.forum.nokia.com/index.php/J2ME_API_Bridge_Interface could be a solution. Typically it is the 'official' version of 'native server on local socket' kind of thing. The APIBridge is 'extensible' & you can write your own 'plugins' for your suitable 'low-level' task.
I am planning to use SCTP for a embedded Linux project. Anybody has some comments on SCTP usage, mostly in one-to-many mode? Did it beat using a home-made UDP-based equivalent solution?
I control the network environement and all devices involved, so compatibility is not an issue.
I have made extensive use of lksctp and have found it to be robust and interoperable with many other implementations of sctp. The standard for the sockets API for SCTP is still evolving but is quite mature and I would expect any further changes to be backwards compatible.
I would use it with confidence.
The ACE library has a performance test for SCTP, so I would assume that it works.
Currently these programs provide the only example code on
how to use ACE's wrapper-facades for SCTP. In the future additional
code will be placed in the ACE_wrappers/examples/IPC_SAP/SOCK_SAP
directory.
Using a framework like ACE is a good idea anyway, as it alloes you to program on a higher level and shields you from the error prone low level details of socket programming. As an additional bonus your code will be portable to all platforms that ACE supports.
Best answer is the comment:
Also, SCTP support in Glibc is less than ideal (in other words, non-present) -- you must use the libraries from lksctp, and it's not entirely well-integrated into the normal sockets API. Just one more reason to use a nice library that encapsulates the low-level functionality :) – ephemient