简体   繁体   中英

Upgrade old Java Xcode Mac Application

I have source for an XCode project that is almost ten years old. The project opens, but the sub-text on the project folder says "missing base SDK" and when I try to run I get the following error:

The run destination My Mac 64–bit is not valid for Running the scheme 'Coopers (Copied)'.

The scheme 'Coopers (Copied)' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64–bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.

The source files for this project are in Java. Any help would be much appreciated.

Well Java used to be supported as a first class language in OS X, and you could build projects in Project Builder (I don't know if it ever made it to XCode)... You had access to all of the Foundation and AppKit Classes, and for the code that wasn't explicitly ported there was a Java Bridge to help integrate code...

I don't think any of that is supported... Apple doesn't really like Java anymore, and doesn't even ship a runtime in modern OS's (but they do "kind of", because if you try to open a java app they will install it automatically, and they still maintain their own java flavor).

I am not sure the state of things... I did find a legacy document for the java bridge and another with a tutorial .

I think you basically have 2 options:

  • Rewrite in Cocoa/Objective-C, you will have to do a line for line transliteration of every class and method, and not every paradigm has an exact counterpart.
  • Make it work in Java, you can re-write your targets to build and run java, in Xcode (it may take a lot of tinkering, to make the target build ant or whatever you use) or you could move it out into a java IDE like NetBeans or Eclipse and build a swing application and link to the JNI if you have C code that you need to execute.

you will have a lot of work to do at any rate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM