Using a Java library in an Objective-C Mac app, and putting that app on the Mac App Store

后端 未结 1 1179
Happy的楠姐
Happy的楠姐 2021-01-06 02:30

I\'ve been researching this problem for a while now, and have not yet arrived at a clear answer. I am writing a Mac OSX application that I intend to eventually put on the ap

1条回答
  •  执笔经年
    2021-01-06 03:20

    @Andrew - in a nutshell, if what you are doing is very simple (and doesn't touch libraries that use java.awt or java.swing) then GCJ /could/ work. I wouldn't recommend it at all really. The reason I say that is because GCJ doesn't support /many/ of the 'newer' java features and unless your java code is written targeting an oldish version of the JDK, you're going to run into compilation issues. If you compile with external 3rd party deps ie eclipse.anything, etc you will run into huge headaches.

    I assume you have code that you have already written in java and want to leverage that code as a service to a much nicer (and native) objc UI. If that is the case, then honestly, I think you will find much more success and far less headache just biting the bullet and creating an objc codebase for your service layer :(

    Of course there is the option of using the native mac ui as merely a thin client for a cloud-based distributed service layer (written in java ofc). But I'm not certain how/what apple thinks about thin clients to web based services in their app store.

    0 讨论(0)
提交回复
热议问题