How can one develop iPhone apps in Java? [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I was wondering if is it possible to develop iPhone applications using Java plus XMLV, which claims to cross-compile Java-based Android applications to native iPhone applications.
Is XMLV a viable way to develop iPhone applications using Java?
Here are a few Java code examples used to build and application in an iPhone:
http://www.xmlvm.org/iphone/#

I think we will have to wait a couple of years more to see more progress. However, there are now more frameworks and tools available:
Here a list of 5 options:
Codename One
RoboVM <-- Closed
Avian no maintainer
XMLVM
J2ObjC
Multi-OS Engine not maintained

If you've completed your other projects, why not take the time to learn Objective-C? There is a ton of material out on the web to help you get started. Honestly, it won't be that hard and learning to do some memory management will be a great learning exercise. Have you programmed in C before?
Most cross compilers won't do a great job in converting your code, and debugging your project may become much more difficult if you develop them this way.

I think your teacher sent you down the wrong path.
This is a classic example of trying to put a square peg into a round hole. The best way to develop for the iPhone is with the iPhone SDK and objective C. The best way to develop for Andriod is Java and the Android SDK. The best way to develop for WinMobile is C#/VB and the .Net Framework.
As you can see each has their own "best" SDK. Since you are only learning Java I would second the suggestion to play around with Java and Android.

There is anew tool called Codename one: One SDK based on JAVA to code in WP8, Android, iOS with all extensive features
Features:
Full Android environment with super fast android simulator
An iPhone/iPad simulator with easy to take iPhone apps to large screen iPad in minutes.
Full support for standard java debugging, profiling for apps on any platform.
Easy themeing / styling – Only a click away
More at Develop Android, iOS iPhone, WP8 apps using Java

take a look at codenameone.com project, it's a cross platform mobile framework where the ui part is a fork of LWUIT.
This project leverage xmlvm to translates the java bytes code to Objective C

You can also take a look at RoboVM.
It translates Java byte-code into native ARM or x86 code which can run directly on the processor without any VM or interpreter needed. Most of the Obj-C UI elements are already bridged into Java and follows the usual Java design patterns.
Edit
Robo VM recently announced that it would be shutting down the service - Source

You need to know at least basics of Objective-C to develop for iPhone. However, it is possible to use C++ classes.
As far as I know Adobe is working on building Flex/Flash applications for iPhone. Read more here: http://theflashblog.com/?p=1513

You can't.
Note however that Monotouch allows you to develop in C# instead of Objective-C. http://monotouch.net/

If you plan on integrating app functionality with a website, I'd highly recommend the GWT + PhoneGap model:
http://blog.daniel-kurka.de/2012/02/mgwt-and-phonegap-talk-at-webmontag-in.html
http://turbomanage.wordpress.com/2010/09/24/gwt-phonegap-native-mobile-apps-quickly/
Here's my two cents from my own experience: We use the same Java POJOs for our Hibernate database, our REST API, our website, and our iPhone app. The workflow is simple and beautiful:
Database ---1---> REST API ---2---> iPhone App / Website
1: Hibernate
2: GSON Serialization and GWT JSON
Deserialization
There is another benefit to this approach as well - any Java code that can be compiled with GWT and any JavaScript library become available for use in your iPhone app.

I'm answering this question 2 years down the line and I must stress that I did have pretty much the same problem as you did. However I'm so happy that Android has evolved into what it is today.
Having said that, I do regret that I did not learn C/C++ while I could have and I don't want to blame my teachers for it cos where was my brain when the time was right?
I'm sunk in Java today and I'm glad that I did not make the mistake of learning too many languages and being less productive... However I did learn HTML5 which really made things a lot easier, maybe someday, I might get motivated to learn C/C++ . Or if I get an Apple mac at a real throw-away price, I might learn Objective-C :)

I think Google Open Sources Java To Objective-C Translator will make it possiblöe to develop in Java for iOS https://code.google.com/p/j2objc/

try to use TotalCross. It is a Java Framework to help devs create iOS and Android apps with only one source code. Different from the others platforms, it doesn't require any knowledge in iOS (Objective-C or Swift) nor Android (SDK or NDK)
there is a maven integration
https://gitlab.com/totalcross/TotalCross/wikis/building-with-maven

http://www.xmlvm.org/android/
Specifically talks about Java based Android apps being ported to the iPhone using non-Apple hardware.
You might also want to check out MonoTouch (C# rather than Java...but the two are very similar).

Perhaps you should consider Android applications instead of iPhone applications if you really want to develop in Java for smartphones. Android natively uses Java for it's applications; so perhaps this might be a better option?
As for iPhone, I would recommend you to look into Obj-C or C/C++ depending on the type of applications you want to make. Should be fun to dabble into a new language! :)

You can try iSpectrum ( get it at http://www.flexycore.com )
You'll be able to develop and debug your Java apps in Eclipse. You'll still need a Mac and XCode to launch it on the simulator, or install it on the real device, though.
But you won't have to actually use XCode editor. Plus you can use it for free if you're planning to work on an open source project.

To add to this there's: http://www.oracle.com/technetwork/developer-tools/adf-mobile/overview/index.html
A Java & HTML5 Based Framework for Developing
Oracle ADF Mobile enables developers to build and extend enterprise
applications for iOS and Android from a single code base. Based on a
hybrid mobile architecture, ADF Mobile supports access to native
device services, enables offline applications and protects enterprise
investments from future technology shifts.

Even if the question states Java, most of the answers have digressed. So I thought I would do the same :)
We have been using Adobe AIR for the last 5 years and it is truly cross-platform and provides native-like performance with the same code base (at least 99% of our code is the same). Adobe AIR got some bad press at the beginning during the 'beta' period (slow, no GPU, Flash 'dead' etc.) But now, it's amazing what you can do with it. Not to mention the wealth of open source libs out there.
With the same code base you can push your app onto:
iOS
Android (x86 and ARM)
Flash (still VERY useful)
ChromeBook
PC (as native with installer)
Mac (as native with installer)
Why bother with Java or Objective-C ?
The only common platform not covered is Window Phone. But that's coming soon too.

Build a hybrid app. Anyways Java is not enough for a software engineer , you need to learn JS,HTML5,CSS as well for becoming a full stack mobile/app developer.
Build the complete backend using Java & frontend using Cordova/Phonegap.
I'm assuming you dont need the last drop of juice from the hardware even hybind app should suffice your needs.
Build a responsive webapp using Bootstrap 4 + React JS. Use https://github.com/ipselon/structor to quickly build up the frontend. Now the web app becomes an app in the browser.
You could also take the same app and build it using cordova to publish a app on ios/android platform.

Related

can i develop a multiple platform project -windows/Android- entirely with a single cross-platform language?

as i'm still learning, i'm not sure what tools, frameworks, even languages i'm gonna work with..
so i'm working on a simple project that got windows side and android side.. that obviously needs at least 2 languages to get it done, but it's impossible that i can learn those languages and know how to deal with their frameworks to get the job done
so is there a language i can develop the entire project(windows & android) with, and without need to any other language no matter what or how many tools or methods im gonna use to make it work?
-note: i know java is essential for the android side, so that's the point im talking about.... "entirely"
I would recommend you giving a loot at Flutter, it's not like native windows but it can produce applications for Android, iOS and web with a single codebase. It's really intuitive to use and the apps built with it work really well.
You can also take a look at React Native expect you need a Native app that you have to use Java as the core language if not give a trial to this
I notice you've tagged this with C#. To answer your question: that. You can write Android apps in it as well via a library called Xamarin that Microsoft bought out and has integrated into the platform.

How can I run python script in android studio with java [duplicate]

This question's answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions.
We are working on an S60 version and this platform has a nice Python API..
However, there is nothing official about Python on Android, but since Jython exists, is there a way to let the snake and the robot work together??
One way is to use Kivy:
Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android and iOS. You can run the same [python] code on all supported platforms.
Kivy Showcase app
There is also the new Android Scripting Environment (ASE/SL4A) project. It looks awesome, and it has some integration with native Android components.
Note: no longer under "active development", but some forks may be.
Yes! : Android Scripting Environment
An example via Matt Cutts via SL4A -- "here’s a barcode scanner written in six lines of Python code:
import android
droid = android.Android()
code = droid.scanBarcode()
isbn = int(code['result']['SCAN_RESULT'])
url = "http://books.google.com?q=%d" % isbn
droid.startActivity('android.intent.action.VIEW', url)
Pygame Subset for Android
Pygame is a 2D game engine for Python (on desktop) that is popular with new programmers. The Pygame Subset for Android describes itself as...
...a port of a subset of Pygame functionality to the Android platform. The goal of the project is to allow the creation of Android-specific games, and to ease the porting of games from PC-like platforms to Android.
The examples include a complete game packaged as an APK, which is pretty interesting.
As a Python lover and Android programmer, I'm sad to say this is not a good way to go. There are two problems:
One problem is that there is a lot more than just a programming language to the Android development tools. A lot of the Android graphics involve XML files to configure the display, similar to HTML. The built-in java objects are integrated with this XML layout, and it's a lot easier than writing your code to go from logic to bitmap.
The other problem is that the G1 (and probably other Android devices for the near future) are not that fast. 200 MHz processors and RAM is very limited. Even in Java, you have to do a decent amount of rewriting-to-avoid-more-object-creation if you want to make your app perfectly smooth. Python is going to be too slow for a while still on mobile devices.
Scripting Layer for Android
SL4A does what you want. You can easily install it directly onto your device from their site, and do not need root.
It supports a range of languages. Python is the most mature. By default, it uses Python 2.6, but there is a 3.2 port you can use instead. I have used that port for all kinds of things on a Galaxy S2 and it worked fine.
API
SL4A provides a port of their android library for each supported language. The library provides an interface to the underlying Android API through a single Android object.
from android import Android
droid = Android()
droid.ttsSpeak('hello world') # example using the text to speech facade
Each language has pretty much the same API. You can even use the JavaScript API inside webviews.
let droid = new Android();
droid.ttsSpeak("hello from js");
User Interfaces
For user interfaces, you have three options:
You can easily use the generic, native dialogues and menus through the
API. This is good for confirmation dialogues and other basic user inputs.
You can also open a webview from inside a Python script, then use HTML5
for the user interface. When you use webviews from Python, you can pass
messages back and forth, between the webview and the Python process that
spawned it. The UI will not be native, but it is still a good option to
have.
There is some support for native Android user interfaces, but I am not
sure how well it works; I just haven't ever used it.
You can mix options, so you can have a webview for the main interface, and still use native dialogues.
QPython
There is a third party project named QPython. It builds on SL4A, and throws in some other useful stuff.
QPython gives you a nicer UI to manage your installation, and includes a little, touchscreen code editor, a Python shell, and a PIP shell for package management. They also have a Python 3 port. Both versions are available from the Play Store, free of charge. QPython also bundles libraries from a bunch of Python on Android projects, including Kivy, so it is not just SL4A.
Note that QPython still develop their fork of SL4A (though, not much to be honest). The main SL4A project itself is pretty much dead.
Useful Links
SL4A Project (now on GitHub): https://github.com/damonkohler/sl4a
SL4A Python 3 Port: https://code.google.com/p/python-for-android/wiki/Python3
QPython Project: http://qpython.com
Learn SL4A (Tutorialspoint): https://www.tutorialspoint.com/sl4a/index.htm
Cross-Compilation & Ignifuga
My blog has instructions and a patch for cross compiling Python 2.7.2 for Android.
I've also open sourced Ignifuga, my 2D Game Engine. It's Python/SDL based, and it cross compiles for Android. Even if you don't use it for games, you might get useful ideas from the code or builder utility (named Schafer, after Tim... you know who).
Termux
You can use the Termux app, which provides a POSIX environment for Android, to install Python.
Note that apt install python will install Python3 on Termux. For Python2, you need to use apt install python2.
Some demos: https://www.youtube.com/watch?v=fqqsl72mASE
The GitHub project: https://github.com/termux
Kivy
I wanted to add to what #JohnMudd has written about Kivy. It has been years since the situation he described, and Kivy has evolved substantially.
The biggest selling point of Kivy, in my opinion, is its cross-platform compatibility. You can code and test everything using any desktop environment (Windows/*nix etc.), then package your app for a range of different platforms, including Android, iOS, MacOS and Windows (though apps often lack the native look and feel).
With Kivy's own KV language, you can code and build the GUI interface easily (it's just like Java XML, but rather than TextView etc., KV has its own ui.widgets for a similar translation), which is in my opinion quite easy to adopt.
Currently Buildozer and python-for-android are the most recommended tools to build and package your apps. I have tried them both and can firmly say that they make building Android apps with Python a breeze. Their guides are well documented too.
iOS is another big selling point of Kivy. You can use the same code base with few changes required via kivy-ios Homebrew tools, although Xcode is required for the build, before running on their devices (AFAIK the iOS Simulator in Xcode currently doesn't work for the x86-architecture build). There are also some dependency issues which must be manually compiled and fiddled around with in Xcode to have a successful build, but they wouldn't be too difficult to resolve and people in Kivy Google Group are really helpful too.
With all that being said, users with good Python knowledge should have no problem picking up the basics quickly.
If you are using Kivy for more serious projects, you may find existing modules unsatisfactory. There are some workable solutions though. With the (work in progress) pyjnius for Android, and pyobjus, users can now access Java/Objective-C classes to control some of the native APIs.
Using SL4A (which has already been mentioned by itself in other answers) you can run a full-blown web2py instance (other python web frameworks are likely candidates as well). SL4A doesn't allow you to do native UI components (buttons, scroll bars, and the like), but it does support WebViews. A WebView is basically nothing more than a striped down web browser pointed at a fixed address. I believe the native Gmail app uses a WebView instead of going the regular widget route.
This route would have some interesting features:
In the case of most python web frameworks, you could actually develop and test without using an android device or android emulator.
Whatever Python code you end up writing for the phone could also be put on a public webserver with very little (if any) modification.
You could take advantage of all of the crazy web stuff out there: query, HTML5, CSS3, etc.
Not at the moment and you would be lucky to get Jython to work soon. If you're planning to start your development now you would be better off with just sticking to Java for now on.
QPython
I use the QPython app. It's free and includes a code editor, an interactive interpreter and a package manager, allowing you to create and execute Python programs directly on your device.
Here are some tools listed in official python website
There is an app called QPython3 in playstore which can be used for both editing and running python script.
Playstore link
Another app called Termux in which you can install python using command
pkg install python
Playstore Link
If you want develop apps , there is Python Android Scripting Layer (SL4A) .
The Scripting Layer for Android, SL4A, is an open source application that allows programs written in a range of interpreted languages to run on Android. It also provides a high level API that allows these programs to interact with the Android device, making it easy to do stuff like accessing sensor data, sending an SMS, rendering user interfaces and so on.
You can also check PySide for Android, which is actually Python bindings for the Qt 4.
There's a platform called PyMob where apps can be written purely in Python and the compiler tool-flow (PyMob) converts them in native source codes for various platforms.
Also check python-for-android
python-for-android is an open source build tool to let you package Python code into standalone android APKs. These can be passed around, installed, or uploaded to marketplaces such as the Play Store just like any other Android app. This tool was originally developed for the Kivy cross-platform graphical framework, but now supports multiple bootstraps and can be easily extended to package other types of Python apps for Android.
Try Chaquopy
A Python SDK for Android
Anddd... BeeWare
BeeWare allows you to write your app in Python and release it on multiple platforms. No need to rewrite the app in multiple programming languages. It means no issues with build tools, environments, compatibility, etc.
From the Python for android site:
Python for android is a project to create your own Python distribution including the modules you want, and create an apk including python, libs, and your application.
Chaquopy
Chaquopy is a plugin for Android Studio's Gradle-based build system. It focuses on close integration with the standard Android development tools.
It provides complete APIs to call Java from Python or Python from Java, allowing the developer to use whichever language is best for each component of their app.
It can automatically download PyPI packages and build them into an app, including selected native packages such as NumPy.
It enables full access to all Android APIs from Python, including the native user interface toolkit (example pure-Python activity).
This used to be a commercial product, but it's now free and open-source.
(I am the creator of this product.)
Yet another attempt: https://code.google.com/p/android-python27/
This one embed directly the Python interpretter in your app apk.
You can run your Python code using sl4a. sl4a supports Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell script.
You can learn sl4a Python Examples.
You can use QPython:
It has a Python Console, Editor, as well as Package Management / Installers
http://qpython.com/
It's an open source project with both Python 2 and Python 3 implementations. You can download the source and the Android .apk files directly from github.
QPython 2: https://github.com/qpython-android/qpython/releases
QPython 3: https://github.com/qpython-android/qpython3/releases
Another option if you are looking for 3.4.2 or newer (3.9.6 as of this writing) is this archive on GitHub.
Python3-Android 3.4.2 or Python3-Android 3.9.6
I believe the original archive supports Python 3.4.2, the latest GRRedwings branch support 3.9.6 and the 22b version of the NDK. Older branches support other versions, but are not as easy to compile with docker.
The older version you simply clone the archive, run make and you get the .so or the .a
The newer versions follow the ReadMe, but it uses docker for consistent builds.
I currently use this to run raw Python on android devices. With a couple modifications to the build files you can also make x86 and armeabi 64 bit
Take a look at BeeWare. It has grown significantly. It is awarded with PSF (Python Software Foundation) Education Grant.
Beeware's aim is to be able to create native apps with Python for all supported operating systems, including Android.
Official Website: Beeware
Github Repo: https://github.com/beeware
Didn't see this posted here, but you can do it with Pyside and Qt now that Qt works on Android thanks to Necessitas.
It seems like quite a kludge at the moment but could be a viable route eventually...
http://qt-project.org/wiki/PySide_for_Android_guide
One more option seems to be pyqtdeploy which citing the docs is:
a tool that, in conjunction with other tools provided with Qt, enables
the deployment of PyQt4 and PyQt5 applications written with Python
v2.7 or Python v3.3 or later. It supports deployment to desktop
platforms (Linux, Windows and OS X) and to mobile platforms (iOS and
Android).
According to Deploying PyQt5 application to Android via pyqtdeploy and Qt5 it is actively developed, although it is difficult to find examples of working Android apps or tutorial on how to cross-compile all the required libraries to Android. It is an interesting project to keep in mind though!
Check out enaml-native which takes the react-native concept and applies it to python.
It lets users build apps with native Android widgets and provides APIs to use android and java libraries from python.
It also integrates with android-studio and shares a few of react's nice dev features like code reloading and remote debugging.

Can a systems developer with NO Java programming experience write Android Apps?

I am basically a embedded systems programmer on linux. However, I would like to try my hand at writing Android applications. With no previous Java experience, are there GUI toolkits or something that can help me. Or is it mandatory to learn Java.
Any links, tips for newbies like me will be very helpful
There are various app builders available for those who do not want to do any programming but they are very limited in the apps they can produce. Basically, such builders offer the developer a series of templates which the developer personalizes before building the app. For instance with a video player template, the developer would choose the look and feel such as background colors etc but the rest of the app would be fixed.
Here is an article that looks at some things to consider before using a No-Programming app- builder
http://hypernextandroid.wordpress.com/2012/09/04/coding-and-no-coding-app-makers/
As you are already a programmer and the Java route is extremely intensive then you could try Basic4Android, HyperNext Android Creator etc. These have much easier learning curves than the Java/Android SDK approach and can still produce native apps.
I am 2 months late, but I have been using a software called Titanium Studio to develop android apps. You cannot write advanced apps like games, but its good for developing simple apps. If you have a mac, then you can develop for iOS as well.
You will basically use javascript and PHP to write your app, which are much easier than learning JAVA.
Cons-
It includes most of the commonly used functions from android, iOS SDK but it is missing a lot as well.
The size of the apps will generally in range of 10-20 MB.
Apart from that, If you want to create a simple app and want to do it quick Titanium is the software to use.
Yes you can. You just require an Android tutorial to get started. Try foolowing links:
One
Two
Three
Four
Its better if you first try learning some basics of Java and then try for this.
Hope this helps.
yes.
App Inventor for Android - its simple and easy, no need of any prior Java programming knowledge
Eclipse with ADT plugin - the better way to develop applications - start with Hello World
For UI development - try inbuilt UI editor with ADT plugin or DroidDraw
Gotta learn Java. But if you're familiar with C then the syntax will be familiar. It's object model is pretty simple and it's libraries are great, so it should be fun. Android, of course, has it's own constraints and best-practices.

Port iPhone application to Android [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What is the most efficient way to port an iPhone app to Android? I know Apple doesn't like 3rd-party, non-Objective C platforms generating code for their platform ... but is there something out there that can take an iPhone app and convert it to Android friendly code?
If not, how have folks out there been creating Android versions of their existing iPhone apps?
Thanks
There's nothing of the sort to port your app. You can use 3rd party tools to create apps that work in both. That's what Titanium and PhoneGap were aiming at. With the new changes to the SDK Agreement, those look like they're not really "legal" or at least violate the agreement.
As for your other question, yes, people do create 2 separate apps. One for Android and one for iPhone. That's the way I currently do it and seems as if Facebook and others do the same.
Yeah, people don't usually love the answer that we have for this one at Appiction. It seems like it should be easy since they are so similar, but they are completely different operating systems with different ways of being used. Sometimes a company will be able to cut a deal with you since the art has already be developed and the basic wireframes have been conceived. At Appiction we created a video to answer this exact question for our clients: http://www.youtube.com/watch?v=Y-fdRw1WNYI
Apportable provides a platform to build and deploy existing Objective C apps to Android.
There are few alternatives to port an app from one platform to other. like Rhodes Mobile, Titanium and PhoneGap. In fact they did a good job and tried very well to remove fragmentation in smart phone app development.
But according to Apple's SDK Agreement version 4.0, section 3.3.1
app must be developed in C/C++/JAVA script.
At this stage convincing way is to write it separately.
PhoneGap is not a true cross platform app development tool.
If you want to create an app for both iPhone and Android using PhoneGap, then you have to create two different apps that will make use of PhoneGap framework. But one single app for iPhone and Android can't be created using PhoneGap.
There really isn't a short cut to porting. The best thing you can do is use a company that specializes in porting, like migration.mobi. The cross-platform frameworks have performance problems and really limit what you're able to do.
Games are a different story altogether, so be ready for different answers if you've been a complex real-time game on iPhone and you want it to work on another platform.
Noodlecake Studios appear to have solved the issue of porting from iOS to Android, recently porting Trainyard among others:
Its no secret that the process of porting iOS games to the Android
platform has been met with rough waters... These issues are
familiar to us at Noodlecake Studios and prompted the creation of
Noodlecake Games, a porting and publishing entity designed to
alleviate many of these problems. Through our efforts over the past
year, we have developed technology that allows us run iOS code
natively on android devices. What that means for developers is there
is no need to rewrite iOS code for the Android platform, it all runs
automatically. To be expected, many developers at first didn’t believe
what we were doing was even possible.
At android there are 2 categories: the lower one, with g1 and the better with Nexus 1 if you want to develop games.
Those cross platform libraries I think they can do cross platform "Hello word" applications.
To generate a correct Blackberry networking application or an optimized Android graphic application (to both categories), I highly doubt it!
the frameworks has the big cons, when you want to look outside of the sandbox. Those 3-4 custom stuff, plugin often cost more, than the whole application written fast until that point.
So, "Hello word" +very basic, only soft stuff with cross platform.
High performance, nice graphic, easier to bugfix, support, professional work: develop for each platform and categories.
There actually is a tool that does exactly what you're asking called O2J. You can leverage your existing Objective-C codebase and convert it to Java with the O2J conversion tool.
It's a paid app available on the Mac App Store... O2J Objective-C to Java Converter
Most of the time it's preferable to have a native UI and native code for performance, working with the platform UI paradigms and to take advantage of platform specific APIs/services.

Can we run Java applications on iPhone? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Can we run or develop apps for iPhone in Java?
Have a look to these links and answer:
http://www.iphonefaq.org/archives/9731
http://www.j2mepolish.org/cms/leftsection/documentation/platforms/iphone.html
http://www.ibm.com/developerworks/opensource/library/os-eclipse-iphone/
Currently, there is no JVM running on the iPhone. This means that the only way you have to develop apps for iPhone in Java is to have a compiler that will compile your java code down to Objective-C code.
There are several solutions that do exactly that:
Codename One - focuses on building applications using Java with visual tools and simulators. Open source with a SaaS backend that removes the need for a Mac.
XMLVM - a translator to convert Java bytecode to C/Objective-C. Open source, but requires writing iOS specific code at the moment.
There are also several proprietary solutions but I have no experience with them. E.g. Software AG has a tool called web objects.
Sun found they could port Java to the iPhone, but the SDK license prohibits it. So this is not a technical but a political issue.
I would say: No
If you want to create "real" native iPhone applications you will have to go with Objective C and the iPhone SDK
There are other ways like http://phonegap.com/ but I personally have no experience with this project.
Webapp can be developed in Java of course, but you're not allowed to run Java applications ON the Iphone (VMs are not authorized on the device).
There is some effort in Java to objective-c conversion, as with XMLVM (check the Google TechTalk video).
At the end what I can conclude is that one can develop iPhone web apps easily with Java.
For developing native apps for iPhone in Java one may use alcheMo or XMLVM with a little working.I have no experience in alcheMo or XMLVM but surely looking forward to it.
Thank You All.
there is an implementation of a java virtual machine called "Classpath", but the drawback is that you may only get it using Cydia/Installer.
Means, you need to jailbreak your iphone in order to be able to install the JVM.
the gui can be designed like an AWT-Gui.
in general: no solution (apple does not allow applications that run other applications on their devices)
if you don't mind hacking the devices your application is deployed to: yes, there shouldn't be a big problem. there is a large amount of tutorials how to hack your iphone, if you're interested...
EDIT: there is a problem! If you don't have the file libuicaboodle every Java-GUI-App for iPhone is looking for, you won't be able to run the app. Is there anybode who still has this file? Can't find it anywhere anymore :o(
regards
there is several ways to write an iphone application on java
by using xmlvm converter to objective c but is hard but it is the suitable and the compatible way to do ur application u need to learn xml language
An interesting approach is combining the Google Web Toolkit with Appcelerator Titanium for developing iPhone applications using Java.
Google Web Toolkit (GWT) allows compilation of Java code into Javascript, while Titanium allows creation of native-looking iPhone applications in Javascript. I have started a project called "gwt-titanium" to combine the two, you can find an explanation about the project and building instructions on the blog at iPhoneJava.org.
Good luck!
What about other Java to native compilers I though there was one calledJet?
This compiles java to native.

Categories