Comments (8)
Interesting! It might have something to do with a hack that I put in that avoids showing the splash screen, although I'm running the same Arduino IDE version and I don't get that particular error. What version of Java are you using?
My thinking is that I can test whether my hack works, and if it doesn't then I'll fall back on using the "official" Arduino CLI directly
from arduino_ci.
Also, you can see from the output the last command I was attempting:
java -cp /Applications/Arduino.app/Contents/Java/* -DAPP_DIR=/Applications/Arduino.app/Contents/Java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -Xms128M -Xmx512M processing.app.Base --install-boards arduino:sam
Without my hack, the correct way to run that from the command line would be
/Applications/Arduino.app/Contents/MacOS/Arduino --install-boards arduino:sam
I'd be curious whether that command works for you. If so, I can try to put some code in that would try to run
java -cp /Applications/Arduino.app/Contents/Java/* -DAPP_DIR=/Applications/Arduino.app/Contents/Java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -Xms128M -Xmx512M processing.app.Base --bogus-option
And if I get a java exception instead of Error: unknown option: --bogus-option
in the output, I can fall back on the "normal" launch method. Let me know if any of these commands work on your machine, and I can push up a development branch for you to try.
from arduino_ci.
I like the idea for the hack, let's see if we can figure it out. I use VSCode and I get the splash screen every time I compile or run the Arduino code, and it gets in the way if I'm using VSCode on full screen as it will switch to the other "Desktop". It also seems a little slow, so maybe the hack can speed things up.
I'm using Java version 9.0.4:
$ java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
The install boards option with Java gets the same exception:
$ java -cp "/Applications/Arduino.app/Contents/Java/*" -DAPP_DIR=/Applications/Arduino.app/Contents/Java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -Xms128M -Xmx512M processing.app.Base --install-boards arduino:sam
Exception in thread "main" java.lang.NoSuchMethodError: com.apple.eawt.Application.isAboutMenuItemPresent()Z
at processing.app.Base.main(Base.java:138)
The Arduino command line works fine:
$ /Applications/Arduino.app/Contents/MacOS/Arduino --install-boards arduino:sam
Loading configuration...
Initializing packages...
Preparing boards...
Downloading platforms index...
from arduino_ci.
And using the old way (uncommented from arduino_installation_rb:37) it works:
$ bundle exec arduino_ci_remote.rb ✘ 1 master ✱ ◼
Installing library under test... ✓
Library installed at /Users/mdlima/Documents/Arduino/libraries/TestSomething... ✓
The set of compilers (1) isn't empty... ✓
Checking g++ version...
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
...Checking g++ version ✓
Installing board package arduino:sam... ✓
from arduino_ci.
That's my thinking here. I'd like to preserve the hack (for both speed and usability). I'm writing some code now to try the hack, and (if I don't get the output I expect) fall back on the "official" method.
from arduino_ci.
Cool, we can get the fallback working then, but I'm also interested in why your hack won't work here. Are you using Java 9 too?
from arduino_ci.
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
from arduino_ci.
This is fixed in the branch but not in released gem yet
from arduino_ci.
Related Issues (20)
- Output errors to stderr HOT 11
- Empty examples folder causes build to fail HOT 2
- arduino_ci.rb fails to report compile error
- The build-CI does not support setWireTimeout(). HOT 1
- Can RP2040 build environment be supported? HOT 10
- compiling unit tests uses arduino platform specific code HOT 6
- running in gitlab CI HOT 3
- Platform.io Support HOT 3
- Improve factorization of "unused space"
- Running "bundle install --path vendor/bundle" generates deprecated warning HOT 1
- Use temporary directories for unit test artifacts
- ESP32 failing to install in CI build HOT 2
- Update documentation to recommend version pinning
- ESP32 flags unused function as error (should be warning) HOT 9
- libraries: "SoftwareSerial" does not work. HOT 11
- "Bad file descriptor" error when installing HOT 2
- Implement Wire.h slave device mock support
- 1.6.0 error: undefined method `library_of_name' for nil:NilClass (NoMethodError) HOT 5
- Show differences lined up and in quotes
- Unable to find library location on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino_ci.