关于j2objc

1、查询是否有JDK,终端输入:java -version
如果有进入下一步,如果没有请自行下载。

2、下载j2objc,地址:
https://github.com/google/j2objc/releases

3、将下载后的j2objc解压放好,我是放在项目根目录下

4、打开xcode,项目-targets-Build Rules-看到”+”,添加脚本。
Process选择:Java source files
然后输入脚本:【注意j2objc的路径,改成你对应的】
[objc]
${PROJECT_DIR}/j2objc-0.9.8.2.1/j2objc -d ${DERIVED_FILES_DIR} \
–no-package-directories ${INPUT_FILE_PATH};
[/objc]
同时在Output Files,添加以下2个
[objc]
${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.h
${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.m
[/objc]

5、项目-targets-Build Settings :
找到Other Linker Flags,添加-l”icucore” -l”jre_emul”
找到Header Search Paths,添加j2objc的include目录。
找到Library Search Paths,添加j2objc的lib目录。

6、拉入java文件,编译随便玩。

78 thoughts on “关于j2objc

  1. Wcankw

    Take the ultimate risk in coco: help the chicken navigate perils while your bet multiplies! Cash out early for safety or push for huge rewards — the choice is yours. Fast rounds and 98% RTP keep the excitement flowing!

  2. Anwhxj

    Votre animal aussi a le droit a une bonne sante ! Decouvrez notre pharmacie veterinaire en ligne : antiparasitaires, soins et alimentation specialisee. Prenez soin de vos compagnons a quatre pattes facilement. Commandez des maintenant pour leur bien-etre.avana

  3. Ykioty

    FanDuel Casino is America’s #1 online casino, delivering direct thrills with ignition casino slots , exclusive slots like Huff N’ Huff, and last retailer action normal at your fingertips. Brand-new players get 500 Bonus Spins together with $40 in Casino Bonus exactly suited for depositing $10—bonus up to $1,000 disown on first-day screen losses. Calling all Thrillionaires: accompany for the nonce, play your nature, and turn every moment into epic wins!

Bpczwb进行回复 取消回复

电子邮件地址不会被公开。