views:

489

answers:

8

Hi there,

In my computer science class, I have completed all my projects; So my teacher thought it'd be a good idea to develope IPhone apps. The only problems is that the class is taught in java, and IPhone apps are written in Objective-C. I was wondering if anyone has developed applications in Java, with XMLVM. This compliler (supposedly) converts java byte code into Objective-C (without needing an apple computer or knowledge of Objective-C). Does anyone know if this is correct?

Any help is greatly appreciated.

http://www.xmlvm.org/overview/

Edit: Here is a code example of Java code being used on an IPhone

http://www.xmlvm.org/iphone/#

+4  A: 

Not quite your answer, but why not try some android development instead ? No Mac required, open source, no investment required, Java based.

Andiih
Well I could ask my teacher if that would be better, but right now he's set on IPhone development...
Brendan
this is a good idea.
darren
how come this is getting downvoted ? The general agreement is this is the only sensible solution ? Downvoters explain thineselves :-)
Andiih
+1, pragmatic solution.
missingfaktor
+1  A: 

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).

Justin Niessner
Would help, but we only have a java compiler at my high school, though I do know C#...
Brendan
+9  A: 

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. Here's one link. 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.

Amir Afghani
I know C++, C#, and some C...so yes I've done SOME C before...
Brendan
The 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.
Chris Hanson
+6  A: 

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 there own "best" SDK. Since you are only learning Java I would second the suggestion to play around with Java and Android.

DeanMc
Well, 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
Don'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.
DeanMc
+2  A: 

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

Jacek
And here's even more on the technology: http://www.adobe.com/devnet/logged_in/abansod_iphone.html
Jacek
Why was this down-voted?
Amir Afghani
+2  A: 

You can't.

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

Thorbjørn Ravn Andersen
+1  A: 

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.

Krusty
+1  A: 

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! :)

Chaoz