tags:

views:

106

answers:

5

We can create Java application using XCode. [ Both console applications and Applets ]. In window menu click Organizer. Then in the bottom of the Organizer window click new from template (Click (+) Symbol). Then click Java template and then select Type of java application. and then write code and create java applications in MAC using xcode. Xcode works like as NETBEANS IDE.

If there is any possible way to implements that JAVA code with Objective - C?. that is we can implements Java in IPhone?

We can able to write CPP in Iphone applications. Java native methods supports CPP. so if any possible way to write IPhone applications using Java.

IPhone's Objective-C supports CPP.

JAVA supports CPP.

so there is any way to communicate java code with Iphone applications?

If anybody knows, how to implements java in IPhone please reply me.

Thanks.

+2  A: 

No, it is not possible.

Kevin Sylvestre
A: 

No,not right now. Someone may come out with a packager similar to Adobe's Flash packager though.

Moshe
As I just said, they have recently reversed this position possibly due to pressure from the government.
Bill K
@Bill K - Yes, they cannot come out strong against this anymore, but my answer is perfectly relevant and accurate, hence no legit reason for downvote.
Moshe
@Moshe I agree--didn't downvote you, I'll correct it for whoever did.
Bill K
@Bill K - thanks.
Moshe
What is with the down votes? Please explain.
Moshe
+3  A: 

Not CURRENTLY possible. Apple has changed its attitude towards third-party language support--it sounds like they aren't strictly forbidden any more, but I doubt they will help.

Anyway, flash is really happy about it and I could see some java-like cross compilers in the future.

Bill K
+1  A: 

I don't want to burn my own reputation points by downvoting others on this, but for C#, there's Novell Monotouch, which lets you do C# on the iPhone.

Searching for "Monotouch Java", I found FlexyCore iSpectrum, which apparently lets you write Java code intended for the iPhone... and then it translates to Objective-C for you. Not sure how well it works, but it definitely sounds possible.

Dean J
Why do you consider the information about C# to be applicable to a question about Java?
hotpaw2
He did mention FlexyCore, and while not a JVM, it is a step in that direction. Still don't know why he would even mention down-voting if that is the best solution.
Peter DeWeese
@hotpaw2: Because the information about C# is how I found the information about Java; I'm showing you the thought process that got me to the answer. My usual goal is to help folks learn to do this themselves.
Dean J
@Peter DeWeese; I hate downvoting because it costs me rep. I think that some of the answers here are wrong, because they simply say "not at all possible". I'm not wasting my rep on downvoting those, but it seems possible to write in Java and have it run on the iPhone to me, albeit with a layer in between.
Dean J
A: 

Although Apple has recently changed their position, and, according to the most recent SDK Agreement, now appears to allow interpreters and alternate development languages within submitted iOS apps, I am not aware of any project to port a JVM interpreter and runtime, or the required support libraries for a Java/ARM compiler, to iOS.

Also, Oracle recently sued a company for creating a mobile Java environment that, in their opinion, did not comply with their licensing terms for Java. So even Java support for iOS which you hand-rolled/home-brewed yourself might need to be implemented under those licensing terms. Apple does require using only their published APIs and following their HIG in App store apps. Doing all those things in combination may or may not be possible.

EDIT:

A little bit of searching reveals some tools that allow Java to Objective C or C translation, the output of which does appear suitable for building iOS apps in Xcode.

hotpaw2