java.awt.image does not exist

225 views
Skip to first unread message

jackyliu...@gmail.com

unread,
Apr 28, 2018, 8:03:18 PM4/28/18
to j2objc-discuss
Hello
I'm converting poi-3.9-sources.jar to objective-c code. I extracted it and added the entire org folder to my ios project. Now there are some errors. I don't know Is it right? My related settings are not set, I will now send out my relevant information.

---errors as follows:

Shell Script invocation Error

Cannot find symbol
HSSFPicture.java

Package.java.rml does not exist
PropertySetFactory.java

Cannot find symbol
SheetUtil.java

Package java.awt.geom does not exist
SheetUtil.java

Cannot find symbol
EscherMetafileBlip.java

Package java.awt.image does not exist
ImageUtils.java

...

---org folder directory as follows:

Hello.java
org
Apache
poi
common
ddf
dev
RecordGenerator.java
EncryptedDocumentException.java
hpsf
Hess
...


---echo $PATH as follows:

.:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/lib:/Users/liuxiaolong/Desktop/eBookConverter/j2objc-2.1.1


---my setting as follows:

if [ ! -f "${J2OBJC_HOME}/j2objc" ]; then echo "J2OBJC_HOME not correctly defined in Settings.xconfig,currently set to '${J2OBJC_HOME}'"; exit 1; fi; "${J2OBJC_HOME}/j2objc" --build-closure -d ${DERIVED_FILES_DIR} -classpath "${CLASS_PATH}" -sourcepath "${PROJECT_DIR}/eBookGo" --no-package-directories -use-arc -g ${INPUT_FILE_PATH}

JAVA_HOME = /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home

CLASS_PATH = ${JAVA_HOME}/jre/lib

Tom Ball

unread,
Apr 29, 2018, 8:54:54 PM4/29/18
to j2objc-...@googlegroups.com
Right, j2objc doesn't support Swing or any other UI toolkit, as described on j2objc.org's main page:

"J2ObjC does not provide any sort of platform-independent UI toolkit, nor are there any plans to do so in the future. We believe that iOS UI code needs to be written in Objective-C, Objective-C++ or Swift using Apple's iOS SDK (Android UIs using Android's API, web app UIs using GWT, etc.)."

J2ObjC is designed to share platform-independent Java code, most often with an Android version of an app. And Android does not support Swing, either.

What I recommend is that instead of trying to do everything on a mobile client, instead have the server do the heavy lifting, since it has more processing power and many actions can be shared by multiple users. Do the POI conversion on the server, and use URLConnection to upload and download documents from it. If that's not suitable, another option is to fork Apache POI and strip out the UI support code you don't need.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jackyliu...@gmail.com

unread,
May 1, 2018, 11:49:57 PM5/1/18
to j2objc-discuss
Thank you,does not support javax.imageio also?

Tom Ball

unread,
May 2, 2018, 10:24:12 AM5/2/18
to j2objc-...@googlegroups.com
It’s all documented: https://developers.google.com/j2objc/javadoc/jre/reference/
On Tue, May 1, 2018 at 8:49 PM <jackyliu...@gmail.com> wrote:
Thank you,does not support javax.imageio also?

Reply all
Reply to author
Forward
0 new messages