1
votes

I am trying to run the convertJavaFXToAndroid from the Ensemble8 sample from the dalvik sdk, but unfortunately it throws an error saying:

C:\dalvik-sdk\samples\Ensemble8>convertJavaFXToAndroid.bat

C:\dalvik-sdk\samples\Ensemble8>#!/bin/bash '#!' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8># Modify the line below, point the ANDROID_SDK t o the android sdk you '#' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8># downloaded. '#' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export ANDROID_SDK=C:/AndroidSDK/sdk 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8># '#' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8># '#' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export HERE=${PWD} 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export DALVIK_SDK=$HERE/../../ 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export JAVAFX_APP_DIR=$HERE/ensemble 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export PATH=$ANDROID_SDK/tools:$PATH 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export WORKDIR=$HERE/android 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export PACKAGE="org.javafxports.ensemble8" 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export NAME="Ensemble8Android" 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>export MAINCLASS="ensemble.EnsembleApp" 'export' is not recognized as an internal or external command, operable program or batch file.

C:\dalvik-sdk\samples\Ensemble8>./gradlew --info createProject -PDEBUG -PDIR=$WO RKDIR -PPACKAGE=$PACKAGE -PNAME=$NAME \ Starting Build Settings evaluated using empty settings script. Projects loaded. Root project using build file 'C:\dalvik-sdk\samples\Ensemble8\ build.gradle'. Included projects: [root project 'Ensemble8'] Evaluating root project 'Ensemble8' using build file 'C:\dalvik-sdk\samples\Ense mble8\build.gradle'. Starting file lock listener thread.

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\dalvik-sdk\samples\Ensemble8\build.gradle' line: 110

  • What went wrong: A problem occurred evaluating root project 'Ensemble8'.

    Error: Can't build Android. Path to Android SDK was not set or is invalid!

Usage: gradle createProject -PANDROID_SDK= -PTARGET= /optional/ -PNAME= -PPACKAGE= -PDIR= -DEBUG -PJFX_MAIN= -PJFX_SDK= -PJFX_APP=

  • Try: Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 4.859 secs

C:\dalvik-sdk\samples\Ensemble8>

I belive that this is a Path issue. Which software should I add in the path? Im currently using windows xp..

Here's the batch file:

#!/bin/bash
# Modify the line below, point the ANDROID_SDK to the android sdk you 
# downloaded.
export ANDROID_SDK=C:/AndroidSDK/sdk
#
#
export HERE=${PWD}
export DALVIK_SDK=$HERE/../../
export JAVAFX_APP_DIR=$HERE/ensemble
export PATH=$ANDROID_SDK/tools:$PATH
export WORKDIR=$HERE/android
export PACKAGE="org.javafxports.ensemble8"
export NAME="Ensemble8Android"
export MAINCLASS="ensemble.EnsembleApp"
./gradlew --info createProject -PDEBUG -PDIR=$WORKDIR -PPACKAGE=$PACKAGE      -PNAME=$NAME  \
-PANDROID_SDK=$ANDROID_SDK -PJFX_SDK=$DALVIK_SDK -PJFX_APP=$JAVAFX_APP_DIR -PJFX_MAIN=$MAINCLASS
1
That's not a batch file...user253751
Oh by the way, I originally got the content from convertJavaFXToAndroid.sh and change its file extension to .batEthyl Casin
That's a shell script, not a batch file. It cannot and will not run in Windows. Changing the extension is exactly the wrong thing to do, since it had the right extension to begin with.Nathan Tuggy
@EthylCasin "I wanted to play a Word document in my MP3 player so I renamed it to .mp3, why isn't it working?"user253751
So, is there a way to convert that into a batch file? I mean, translate the contents into a batch file?Ethyl Casin

1 Answers

9
votes

Instead of using the keyword "EXPORT", change it to "SET".