Using XMLVM: Android to iPhone - iphone

Related to this question: Use with XMLVM to convert android app to iphone app
XMLVM comes with several demo projects which I assume must work perfectly for some people. I've been running into snags and can't find very much documentation to help me. I've been following the documentation from the xmlvm site: http://www.xmlvm.org/documentation/manual.pdf
My story so far (skip down a bit for my current problem)
First of all, this is a Windows XP SP3 32-bit system.
I installed Android SDK and downloaded and installed SDK Platform Android 1.5, 1.6, 2.2, 2.3.3, 3.0.
I checked out XMLVM and built it using ant. So far, so good. (Section 1.3 on the manual)
I tried building the android demo projects (xokoban, helloworld, afireworks). Each one fails, complaining that it can't find my Android SDK. It's been properly set up as described in the manual, so I open up the build.xml files to see what they're actually looking for... they're looking for "$sdk$/tools/android". Well, the android sdk has an "android.bat" in the right spot, so I copy the batch file as just "android" and the builds run fine now.
My current problem:
Now I invoke XMLVM using the line
java -Xmx1G -jar c:\xmlvm\xmlvm.jar --in=/demo/android/helloworld --target=android-on-iphone --app-name=bleh
And I get the error
Error: Unknown target: android-on-iphone
So I try the same line, but with --target=iphone
This returns the error
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.simontuffs.onejar.Boot.run(Boot.java:306)
at com.simontuffs.onejar.Boot.main(Boot.java:159)
Caused by: java.lang.NullPointerException
at org.xmlvm.util.FileSet$3.hasNext(FileSet.java:98)
...
In a nutshell, I'm stuck and I can't even get through the demo. Halp.

RTFM.......... In fact, this part was highlighted in the "related post":
In section 2.2.3 of the manual, it clearly states that the makefile will only work on a Mac OS platform with the Xcode IDE. I guess I really can't start on this project until I get the mac.

Related

Is there a solution around Pentaho 9.3 Spoon errors related to Apple Silicon M1 ARM?

Installed Pentaho Data Integration 9.3 on Mac OS Monterey on a MacBook Pro M1 (Apple Silicon.)
I am running OpenJDK 11:
Openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10)
OpenJDK 64-Bit Server VM (build 11.0.15+10, mixed mode)
The install.sh process runs without error. However, after install, trying to execute the spoon.sh process, the following errors occur...
WARNING: Using java from path
DEBUG: _PENTAHO_JAVA_HOME=
DEBUG: _PENTAHO_JAVA=java
DEBUG: PENTAHO_INSTALLED_LICENSE_PATH=
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-cocoa-3738 in java.library.path: [./../libswt/osx64/]
no swt-cocoa in java.library.path: [./../libswt/osx64/]
Can't load library: /Users/jgregory/.swt/lib/macosx/aarch64/libswt-cocoa-3738.jnilib
Can't load library: /Users/jgregory/.swt/lib/macosx/aarch64/libswt-cocoa.jnilib
Can't load library: /Users/jgregory/.swt/lib/macosx/aarch64/libswt-cocoa-3738.jnilib
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at org.pentaho.di.ui.core.widget.OsHelper.setAppName(OsHelper.java:106)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:652)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Has anyone run into this issue and are there any known workarounds?
Download latest swt for arm64 support from here
https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/S-4.25M1-202207061800/swt-4.25M1-cocoa-macosx-aarch64.zip&mirror_id=518
unzip it, get swt.jar and Put it under /path_to_your_data-integration/libswt/osx64/ and delete the one thats there.
Than using rosseta shell, guide how to set up rosseta can be found here:
https://stackoverflow.com/a/68571463/19586128
start the spoon.sh with required configurations
If you use java 8 It will complain first with:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/swt/widgets/Control has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I update my JAVA_HOME to 18 (17 works too) and it worked
This worked for me, but please feel free to ask if it does not work and i can help more with this
Download this jar from here and replace the one from /path_to_your_data-integration/libswt/osx64/.
Don't forget to run it using Rosetta and from the terminal
/Applications/data-integration/Data Integration.app/Contents/MacOS
Run
./JavaApplicationStub

Why do I get IllegalStateException: Missing hosting module org.netbeans.libs.javacimpl when upgrade to Netbeans 13?

After I upgraded Netbeans from 12.6 to 13, Netbeans doesn't start. When I start it from the command line, I got the following message:
java.lang.IllegalStateException: Missing hosting module org.netbeans.libs.javacimpl for fragment org.netbeans.modules.nbjavac.impl
at org.netbeans.ModuleManager.refineClassLoader(ModuleManager.java:909)
at org.netbeans.StandardModule.classLoaderUp(StandardModule.java:527)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1330)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1254)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:315)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:251)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:298)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:156)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:125)
at org.netbeans.core.startup.Main.start(Main.java:282)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
at java.base/java.lang.Thread.run(Thread.java:829)
What's the reason? How can I fix it?
This is caused by old nb-javac (Netbeans Java Compiler) modules installed in an older Netbeans version, which are incompatible with nb-javac, which is now bundled in Netbeans.
It's necessary to remove those old modules. You can find them in the Netbeans user directory. On Linux this is for example in ~/.netbeans or in ~/snap/netbeans/current, if installed as a Snap package. Those nb-javac files are in the modules directory in that directory (e.g. ~/.netbeans/modules) and include nbjavac in the name, e.g. org-netbeans-modules-nbjavac-api.jar. Delete all such files that include nbjavac. Then start Netbeans again, all should work now.
This problem was reported for a development version of Netbeans 13 on the developers' mailing list: https://www.mail-archive.com/dev#netbeans.apache.org/msg09777.html. There are original instructions that helped me to fix this issue. I wasn't using any development build of Netbeans, I just upgraded from the regular version 12.6 to the version 13 of Netbeans. In Netbeans 12.6, I installed the nb-javac plugin, which probably brought these incompatible modules that needed to be removed.
People who are struggling on macOS, same answer as OndroMih but these directories
/Users/<your_user>/Library/Caches/NetBeans
/Users/<your_user>/Library/Application Support/NetBeans

SDK manager path [duplicate]

I am trying to build old unity version(v_4.6.3) project. but i have got a error. already i have got successful result, but current my sdk is updated with latest version.
http://screencast.com/t/u7lNiyoc
Here is my unity error log.
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:\Program Files\Java\jdk1.8.0_66\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/Temp/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/utils/ILogger
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at SDKMain.main(SDKMain.java:128)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
]
stdout[
]
How can i fix this issues. Thank you for advances. Kind Regards.
The solution to this problem is constantly changing over time as Unity and the Android SDK change.
Note that his problem is presumably fixed in Unity 2017.1.
LATEST SOLUTION
1) For Windows, download "tools_r25.2.3-windows.zip" and unzip it.
2) For MacOSX, download "tools_r25.2.3-macosx.zip" and unzip it.
3) Add the path of the unzipped SDK to the Edit -->Preferences ---> External Tools --->SDK box.
STILL NOT WORKING?
Uninstall SDK Tools 25 and Android SDK Tools 26. Uninstall both SDK Platform-Tools and SDK Tools. Use version number below that.
OLD SOLUTION:
You did not setup your SDK properly.
Follow the steps below to setup your Android SDK.
1. Make sure that there are no spaces in your SDKpath. So create a folder called AndroidSDK in the C directory.
2. Copy your Android-sdk folder to the C:/AndroidSDK directory.
Now, your SDK path should look like this:
C:/AndroidSDK/Android-sdk
3. Update your Android SDK path in the Unity Editor.
Now, check if it works by trying to Build for Android again.
If it fails, continue from below
4. Download the latest Unity version.
5. Re-download SDK then copy the file to C:/AndroidSDK/Android-sdk.
6. Go back to Unity and Update the path
7. Build the Project for Android again, it will show an error and ask you to update SDK.
Click on the "Update Android SDK" buttom. Unity will Automatically update your SDK. Your SDK should then look like something below. Your problem should be gone by now.

(Unity android build error) Error building Player: CommandInvokationFailure: Unable to list target platforms issue [duplicate]

I am trying to build old unity version(v_4.6.3) project. but i have got a error. already i have got successful result, but current my sdk is updated with latest version.
http://screencast.com/t/u7lNiyoc
Here is my unity error log.
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:\Program Files\Java\jdk1.8.0_66\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/Temp/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/utils/ILogger
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at SDKMain.main(SDKMain.java:128)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
]
stdout[
]
How can i fix this issues. Thank you for advances. Kind Regards.
The solution to this problem is constantly changing over time as Unity and the Android SDK change.
Note that his problem is presumably fixed in Unity 2017.1.
LATEST SOLUTION
1) For Windows, download "tools_r25.2.3-windows.zip" and unzip it.
2) For MacOSX, download "tools_r25.2.3-macosx.zip" and unzip it.
3) Add the path of the unzipped SDK to the Edit -->Preferences ---> External Tools --->SDK box.
STILL NOT WORKING?
Uninstall SDK Tools 25 and Android SDK Tools 26. Uninstall both SDK Platform-Tools and SDK Tools. Use version number below that.
OLD SOLUTION:
You did not setup your SDK properly.
Follow the steps below to setup your Android SDK.
1. Make sure that there are no spaces in your SDKpath. So create a folder called AndroidSDK in the C directory.
2. Copy your Android-sdk folder to the C:/AndroidSDK directory.
Now, your SDK path should look like this:
C:/AndroidSDK/Android-sdk
3. Update your Android SDK path in the Unity Editor.
Now, check if it works by trying to Build for Android again.
If it fails, continue from below
4. Download the latest Unity version.
5. Re-download SDK then copy the file to C:/AndroidSDK/Android-sdk.
6. Go back to Unity and Update the path
7. Build the Project for Android again, it will show an error and ask you to update SDK.
Click on the "Update Android SDK" buttom. Unity will Automatically update your SDK. Your SDK should then look like something below. Your problem should be gone by now.

Android SDK: How to set up old versions? eg. gingerbread

my goal here is to run an android emulator with various old versions of Android to test web apps. I am an android newbie. I have a Nexus 7 with Jellybean. The bugs on the web apps are reported in older versions.
So far I have;
Installed Android SDK on a Windows 8 desktop, created and run emulators but it's limited to Android 4.2 only (Jellybean)
I think the next step is to run the SDK Manager -- Ecplipse > Window > Android SDK Manager
Doing this reports that the Manager will show shortly -- nothing happens. In the console I get this error;
[2013-02-09 16:31:49 - SDK Manager] [SDK Manager] \adt-bundle-windows-x86_64\sdk\tools\lib\\find_java.exe was unexpected at this time.
Running find_java.exe from the command line gives:
D:\Program Files (x86)\adt-bundle-windows-x86_64>sdk\tools\lib\\find_java.exe
C:\Program Files\Java\jre7\bin\java.exe
D:\Program Files (x86)\adt-bundle-windows-x86_64>where java
C:\Program Files\Java\jre7\bin\java.exe
C:\Windows\System32\java.exe
I have updated the PATH environment var to include the jre7 directory as above, and added a ANDROID_SDK_HOME as D:\Users\myuser_000\Documents\Workspace -- devices I create appear in a .android\avd sub-directory.
I am running the SDK on Windows 8, installed in D:\Program Files (x86)\adt-bundle-windows-x86_64
Is running the SDK Manager the correct action?
Any ideas what would cause the SDK Manager not to display?
Thank you!
The error was in the android.bat file.
I edited the following to comment out the call to find_java.bat and hard coded to my installed version of Java.
rem Check we have a valid Java.exe in the path.
set java_exe="C:\Program Files\Java\jre7\bin\java"
rem call lib\find_java.bat
Hope this helps someone in the future.
Something that may have complicated the issue was windows 8 catching android.bat as an unsafe program and automatically stopping it. I saw this when manually trying to run the batch file.