How can one develop iPhone apps in Java?
Solution 1
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.
Solution 2
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
Solution 3
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.
Solution 4
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
Solution 5
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
Brendan Lesniak
Working as a Software Engineer in the Quality Management and Contact Center space. In my free time I like to work on a wide variety of projects, from Legacy Swing applications, to Web Apps, to Embedded Systems.
Updated on February 08, 2021Comments
-
Brendan Lesniak over 3 years
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:
-
Jacek over 14 yearsAnd here's even more on the technology: adobe.com/devnet/logged_in/abansod_iphone.html
-
Brendan Lesniak over 14 yearsWell, I do know C#, some C++, and other languages, so maybe learning Objective-C won't be too hard for me. I'm just trying to get an idea of how difficult it would be if I were to use Java. My teacher just threw this at me today...
-
Brendan Lesniak over 14 yearsWould help, but we only have a java compiler at my high school, though I do know C#...
-
Brendan Lesniak over 14 yearsI know C++, C#, and some C...so yes I've done SOME C before...
-
Amir Afghani over 14 yearsWhy was this down-voted?
-
deanvmc over 14 yearsDon't spread yourself too thing either, people have a habit of being aware of many languages but not very good at one. I would suggest to leave objective C off the list for a while and go play with the many Java SDK's that are floating about.
-
Chris Hanson over 14 yearsThe major difficulties for Java/C#/ActionScript/JavaScript folks are (1) the existence of and syntax for pointers and (2) manual memory management. Since you have some C++ and C under your belt, you should be able to pick up Objective-C relatively easily.
-
Pratik over 11 yearsNow it is possible with phone gap framework
-
Andiih over 11 yearsWorth noting that (now) Monotouch is xamarin.com/ios?gclid=CKu1juOp77UCFUbMtAodUnIAYg
-
setherj almost 10 yearsGood list, these seem like they may be the top ones.
-
Christopher Fraser about 9 yearsRoboVM recently reached version 1.0
-
Brendan Lesniak about 9 yearsThis question was asked in end of 2009, beginning of 2010... but thanks for your input anyway.
-
simbo1905 over 8 yearsDefinitely anyone starting out from Java should be looking to write HTML5 frontends which work with desktop and mobile browsers and that can use Apache Cordova (phone gap) to be bumbled into native apps on every possible phone and tablet. Use jquery mobile as the skin and jquery for the Ajax then on the Java webserver try out a few technologies to see which ones are easy (eg Spring Boot is highly productive, modern, but good for s CV as a bridge into (possibly legacy) enterprise Java). For bonus marks use websockets not Ajax which will excite potential employers).
-
Maciek Łoziński almost 8 yearsRoboVM is closed. robovm.com/robovm-winding-down
-
Quazi Irfan over 7 yearsAnother relatively new option is Intel Multi-OS Engine. libgdx is using to deploy to iOS.
-
Lloyd Sargent over 7 yearsLearn as many languages as you can. It will give you an appreciation of the power (and weaknesses) of each. I, personally, know about 10 languages—although I admit I’m rusty in some of them.
-
Crouching Kitten over 7 yearsThe link to the tutorial is dead.
-
Brendan Lesniak about 7 yearsJust a heads up this question is from 2010...
-
tmsppc about 7 years-1 because this doesn't answer the question of "how to code with Java in iOS". I value the content of this answer, but it's not appropriate as an StackOverflow answer. This answer is discussing the benefits of taking a different approach, and the question seems to be clear about the need of not using a Mac nor Objective C.
-
Brendan Lesniak almost 7 yearsThis question was asked years ago by myself (almost 7 years ago...). Anyway, yeah Java must not be enough for a Software Engineer; but it sure pays my 6 figure salary. Yep. Not enough.
-
Rohitdev almost 7 yearsBecause this page is turning up in the results and there will be people stumbling upon this page.
-
Admin over 6 yearsBecause you need to keep a focus and that's why this is not a good answer.
-
Jonathan over 5 yearsId say 1 year to master java, 3 years to master C++, and 3 months to master HTML5
-
cupiqi09 about 4 years@BrendanLesniak: So what? More recent answers to a topic that evolves as much as this one are always welcome, I'd say Even more so since it is still a Google top hit in 2020...
-
Noor Hossain over 2 yearsSo the question is "how"?