Java Xcode Application On Windows?

Discussion in 'Mac Programming' started by ChrisUK86, Dec 10, 2007.

  1. ChrisUK86 macrumors newbie

    Joined:
    Dec 10, 2007
    #1
    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...
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Yes, if you only use the standard Java classes, No if you use any of the Apple/OSX specific ones.
     
  3. ChrisUK86 thread starter macrumors newbie

    Joined:
    Dec 10, 2007
    #3
    Thanks for the reply.

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

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    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.
     
  5. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #5
    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.
     
  6. ChrisUK86 thread starter macrumors newbie

    Joined:
    Dec 10, 2007
    #6

    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.
     
  7. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #7
    Personally I'd stick with Eclipse/Netbeans as you know you wont run into any Apple only issues. But its up to you.
     
  8. ShosMeister macrumors newbie

    ShosMeister

    Joined:
    Dec 28, 2007
    #8
    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!!!!
     
  9. Gelfin macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    Denver, CO
    #9
    Yeah, like a half-dozen of them I've seen just today. This is not an optimal strategy.

    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.

    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.
     
  10. ShosMeister macrumors newbie

    ShosMeister

    Joined:
    Dec 28, 2007
    #10
    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!

    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!!!
     
  11. ShosMeister macrumors newbie

    ShosMeister

    Joined:
    Dec 28, 2007
    #11
    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.
     
  12. Gelfin macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    Denver, CO
    #12
    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.
     
  13. ShosMeister macrumors newbie

    ShosMeister

    Joined:
    Dec 28, 2007
    #13
    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?
     
  14. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #14
    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.
     
  15. ShosMeister macrumors newbie

    ShosMeister

    Joined:
    Dec 28, 2007
    #15
    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.
     

Share This Page