使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
什么是 J2ObjC
J2ObjC 是 Google 推出的一款开源命令行工具,
将 Java 源代码转换为 Objective-C 版本(适用于 iOS (iPhone/iPad) 平台)。此工具
允许 Java 源代码成为 iOS 应用构建的一部分,因为无需修改
生成文件。目标是编写应用的非界面
代码(例如应用逻辑和数据模型),然后
由 Web 应用(使用 J2CL)、Android 应用
和 iOS 应用。
开始使用
J2ObjC 支持
包括异常、内部和
匿名类、泛型类型、线程和反射JUnit 测试
也支持翻译和执行
J2ObjC 不是什么
J2ObjC 不提供任何类型的独立于平台的界面工具包,
未来我们有合作的计划我们认为,iOS 界面代码需要
使用 Apple iOS SDK 用 Objective-C、Objective-C++ 或 Swift 编写。
J2ObjC 无法转换 Android 二进制应用。开发者必须拥有源代码,
为自己的 Android 应用添加代码。
要求
- Mac 工作站或笔记本电脑
- Mac OS X 13.5 或更高版本
- Xcode 15 或更高版本
- JDK 11 或更高版本
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-16。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-08-16。"],[[["J2ObjC is a tool that translates Java source code to Objective-C for iOS app development, allowing shared code across web, Android, and iOS platforms."],["It supports most Java language features but does not offer a platform-independent UI toolkit and requires source code for Android app conversion."],["Developers need a Mac running macOS 13.5 or higher, Xcode 15 or higher, and JDK 11 or higher to utilize J2ObjC."]]],["J2ObjC, a Google open-source tool, converts Java code to Objective-C for iOS development, enabling shared non-UI code between web, Android, and iOS apps. It supports Java features like exceptions, generics, and threads, along with JUnit testing. It requires a Mac with recent OS X, Xcode, and JDK. It does not translate UI code or Android binaries, only Java source code. It aims to let developers write app logic in Java and be able to use it across platforms.\n"]]