Giter VIP home page Giter VIP logo

Comments (9)

danielsiwiec avatar danielsiwiec commented on June 19, 2024

Hi @danielo515. Thank you for submitting the issue. Yes, I have seen this problem with Java 9+, but never got to address it. I just pushed a fix.

Also - which JDK version are you running? The fix will work with Java 9, 10 and 11, but 12 will struggle as JDK stopped shipping with the EE libraries beginning with version 12. I assume the Eclipse plugin will not work with Java 12 either.

I gave this fix a test, but could you also give it a try and let me know, so I can close the issue?

from garmin-connect-seed.

danielo515 avatar danielo515 commented on June 19, 2024

Hello @danielsiwiec,
Thank you for your answer.
I'm using the same exact configuration that the eclipse plugin is using. In fact, I just took a look at the eclipse console and just copied the path, so I assume that eclipse is using java 12.
Could you please point me to the fix you are mentioning?

from garmin-connect-seed.

danielo515 avatar danielo515 commented on June 19, 2024

Ok, found it:30665fe

from garmin-connect-seed.

danielo515 avatar danielo515 commented on June 19, 2024

Where are you taking the file "--add-modules=java.xml.bind" from?

from garmin-connect-seed.

danielo515 avatar danielo515 commented on June 19, 2024

Ok, I finally make it work by changing monkeydo script to this

/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/bin/java -classpath "$MB_HOME"/monkeybrains.jar com.garmin.monkeybrains.monkeydodeux.MonkeyDoDeux -f "$PRG_PATH" -d $DEVICE_ID -s "$MB_HOME"/shell $TEST_FLAG $TEST_NAME

To be honest, it should not use java directly and should use some of the available options on the path, like JAVA_HOME.
Thanks for your help and support with this

from garmin-connect-seed.

danielo515 avatar danielo515 commented on June 19, 2024

In any case, I'm still guessing why this works with eclipse ide, who seems to be using the same java version that I was using. Maybe eclipse plugin includes the required libraries? I hate eclipse, and I have no idea how to check this, but I would love to know it to make my projects a little bit more future proof

from garmin-connect-seed.

danielo515 avatar danielo515 commented on June 19, 2024

Finally I get it working by using the following build script without changing the monkeydo or any other script inside the SDK at all:

SDK_HOME=/Users/danielo/garmin-sdk/connectiq-sdk-mac-3.1.4-2019-09-17-f1e7e9687
DEVICE=fenix5
appName=garmin-hello-world
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home

# Build
"$SDK_HOME/bin/monkeyc" \
    --output "$(pwd)/bin/$appName.prg" \
    --private-key /Users/danielo/garmin-sdk/developer_key \
    --device $DEVICE \
    -s 3.0.0 \
    --warn \
    --jungles $(pwd)/monkey.jungle

PATH=$JAVA_HOME/bin:$PATH $SDK_HOME/bin/monkeydo bin/${appName}.prg $DEVICE

from garmin-connect-seed.

danielsiwiec avatar danielsiwiec commented on June 19, 2024

Hmm. I see what you did there. By setting JAVA_HOME like this, you are actually using Java 8 (jdk1.8.0_221.jdk), instead of Java 12.

Regarding --add-modules=java.xml.bind this addresses the problem for Java 10 and 11. They both ship with this file, it's just not included in the classpath by default anymore. Java 12 stopped shipping with it, so this will need a different solution, likely Garmin SDK shipping with this additional JAR.

Thank you for putting the effort into this issue @danielo515!

from garmin-connect-seed.

danielo515 avatar danielo515 commented on June 19, 2024

Thanks to you @danielsiwiec !! And thank you for this template.

from garmin-connect-seed.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.