Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ChrisUK86

macrumors newbie
Original poster
Dec 10, 2007
4
0
Hi,

I wanted to know if I can code a Java application in xCode and run the Jar on Windows & Mac without any changes?

if so how is this possible...
 

ChrisUK86

macrumors newbie
Original poster
Dec 10, 2007
4
0
Yes, if you only use the standard Java classes, No if you use any of the Apple/OSX specific ones.

Thanks for the reply.

So basically the sample Java App you get with xCode called"This is a Java Application" will run on Windows?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
I've no idea as I've never looked at it, and I'm at work so not on a Mac right now. As long as it doesn't import com.apple. anything it probably is.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
So basically the sample Java App you get with xCode called"This is a Java Application" will run on Windows?

Yes. Btw is this for a University assignment or real-world programming?

Generally for more complex development, you'll be better off using Eclipse or Netbeans, but they do have a learning curve. If you are doing basic assignments you should be OK to stick with Xcode.

Note that interfaces built in Interface Builder won't work on Windows.
 

ChrisUK86

macrumors newbie
Original poster
Dec 10, 2007
4
0
Yes. Btw is this for a University assignment or real-world programming?

Generally for more complex development, you'll be better off using Eclipse or Netbeans, but they do have a learning curve. If you are doing basic assignments you should be OK to stick with Xcode.

Note that interfaces built in Interface Builder won't work on Windows.


Hi,

Its for my final year project. I have used Eclipse and Netbeans before.... But I have recently started using xCode and I love it.... I know the interface builder wont work in xCode but... I have already designed the interface that I want within Netbeans Swing GUI builder and just have exported the jar library file to xCode.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
Hi,

Its for my final year project. I have used Eclipse and Netbeans before.... But I have recently started using xCode and I love it.... I know the interface builder wont work in xCode but... I have already designed the interface that I want within Netbeans Swing GUI builder and just have exported the jar library file to xCode.

Personally I'd stick with Eclipse/Netbeans as you know you wont run into any Apple only issues. But its up to you.
 

ShosMeister

macrumors newbie
Dec 28, 2007
25
0
In doing a bunch of searching all over the web for an answer, I came across this thread. To be up-front, I've posted similar questions in other threads as well.

I am trying to work on an application that will eventually be on the Palm to handle SMS messaging. What I wanted to do though was develop it on the Mac in Java. I figured that would be the simplest method for testing and debugging. Then I could figure out how to port over the logic/modules/objects/whatever to the Palm SDK (still need to figure out where to get that) and then do whatever minor debugging should be necessary.

The problem is, I can't seem to find any library to allow for bluetooth connections on the Mac in OSX in Java. There are libraries listed on Sun's site, but, they are all PC. The only one I could find for Mac wasn't free (plus it looked old). Do you have any ideas? Hints? Suggestions? Other sources?

BTW, all of my programming skills are self taught and I've not been able to come close to figuring out the XCode thing; tough for me to learn the environment or other code when I can't single step through it to see what it's doing since that's how I learned most everything I know. That's why I was going to stick with Java for now.

Thanks!!!!
 

Gelfin

macrumors 68020
Sep 18, 2001
2,165
5
Denver, CO
In doing a bunch of searching all over the web for an answer, I came across this thread. To be up-front, I've posted similar questions in other threads as well.

Yeah, like a half-dozen of them I've seen just today. This is not an optimal strategy.

I am trying to work on an application that will eventually be on the Palm to handle SMS messaging. What I wanted to do though was develop it on the Mac in Java. I figured that would be the simplest method for testing and debugging. Then I could figure out how to port over the logic/modules/objects/whatever to the Palm SDK (still need to figure out where to get that) and then do whatever minor debugging should be necessary.

I'm almost certain you figured wrong. I have not even looked at Palm development in years, and it's doubtless changed significantly, but what little I remember suggests that the way to accomplish such a thing on the Mac bears very little resemblance to the way to do so on a Palm device. For something most Palm devices can do natively like SMS, you're probably pursuing a much harder course to wind up with something you won't be able to port anyway.

As for Palm developer information, Googling "palm developer" pretty much gets you straight there.

tough for me to learn the environment or other code when I can't single step through it to see what it's doing since that's how I learned most everything I know.

Most modern mobile platform tools include either an emulator or remote debugger (or both) that allow you to step through code. I can't confirm that specifically for Palm, but I know it to be the case for BlackBerry and Windows Mobile.
 

ShosMeister

macrumors newbie
Dec 28, 2007
25
0
I'm almost certain you figured wrong. I have not even looked at Palm development in years, and it's doubtless changed significantly, but what little I remember suggests that the way to accomplish such a thing on the Mac bears very little resemblance to the way to do so on a Palm device. For something most Palm devices can do natively like SMS, you're probably pursuing a much harder course to wind up with something you won't be able to port anyway.
Sorry for the confusion. I don't expect that I can port the code over at all. Just the logic of the code. And since I don't know what the Palm development environment is like, I thought I would start on something that I know. Also, I have already managed to get the code to read the Palm db files so I can actually test directly with my real data. Thanks for the warning/reminder though!

Most modern mobile platform tools include either an emulator or remote debugger (or both) that allow you to step through code. I can't confirm that specifically for Palm, but I know it to be the case for BlackBerry and Windows Mobile.
I was actually referring to trying to figure out the XCode/Ojb-C environment. I have some sample files and if I single step into it, I get nothing. Probably me doing something wrong as I've not used XCode for much other than straight C.

Maybe it would be a good thing to at least look at the Palm development environment first although I'm still not sure it will solve the bluetooth problem.

Thanks!!!
 

ShosMeister

macrumors newbie
Dec 28, 2007
25
0
As for Palm developer information, Googling "palm developer" pretty much gets you straight there.

Most modern mobile platform tools include either an emulator or remote debugger (or both) that allow you to step through code. I can't confirm that specifically for Palm, but I know it to be the case for BlackBerry and Windows Mobile.

Actually, it doesn't get you "straight there". I had searched, but, ran into a number of issues. Not the least of which is there doesn't seem to be any complete packages for the Mac and I've managed to get completely lost trying to figure out exactly what pieces from what sites I need to download to even attempt it. I had to register on 3 different sites just to look at their downloads sections only to see that their tools/environments were only for PC and the ones I did find for Mac were 3-4 years old (and my guess is not going to work in 10.4).

If you have any hints you could provide, it would be greatly appreciated.
 

Gelfin

macrumors 68020
Sep 18, 2001
2,165
5
Denver, CO
Actually, it doesn't get you "straight there". I had searched, but, ran into a number of issues. Not the least of which is there doesn't seem to be any complete packages for the Mac and I've managed to get completely lost trying to figure out exactly what pieces from what sites I need to download to even attempt it. I had to register on 3 different sites just to look at their downloads sections only to see that their tools/environments were only for PC and the ones I did find for Mac were 3-4 years old (and my guess is not going to work in 10.4).

If you have any hints you could provide, it would be greatly appreciated.

As I said, I'm years south of any Palm exposure I once had, and the fact no one else has stepped up suggests the information you're looking for might just not reside in this community. If there's one hint I can provide you, it's to brace yourself for the realization that there might not exist a complete up-to-date Palm toolchain on the Mac platform. Beyond that, the official Palm developer site that should have been at the top of your Google results has forums, I think I recall. You might have better luck asking there.
 

ShosMeister

macrumors newbie
Dec 28, 2007
25
0
Has anyone tried developing under Parallels using the PC SDK/IDE/etc.? Just a thought although I'm not sure what I would end up with.

If so, does Parallels hook into the Mac Bluetooth stuff so I could develop Bluetooth apps for use on either/both platforms?
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
If so, does Parallels hook into the Mac Bluetooth stuff so I could develop Bluetooth apps for use on either/both platforms?

I assume you are still wondering how to develop for Palm?

The emulator that comes with the Palm SDK gives you a device profile to test your code against. You don't need bluetooth on the machine you are developing on.
 

ShosMeister

macrumors newbie
Dec 28, 2007
25
0
Thanks! That looks like the best option at this point since it's the only platform that seems to be current. I'm still thinking of just developing a simple Java version of it first - plus I'll be able to use it on my Mac anyway since the SMS seems to have stopped working for some reason.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.