score:1
i will be answering my own question by providing some updates: i contacted the author who suggested i try the java compiler, not eclipse's: building with ant (and hence using the jdk javac compiler) compiles just fine, and the application runs.
when i looked at the status of java 8 support in eclipse, it seems there are many things to be resolved : https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=1.8%20lambda
as @jewelsea pointed, intellij idea shows the error but will compile and execute (i assume it uses the jdk-provided javac).
so the answer is : wait for upcoming updates to eclipse and/or the jdk. this specific case is easy to work-around.
and the real issue is that maptoobj
provides a stream<object>
, and the loop will pass object
to the ::add
which expects node
instances (as rectangle
are).
score:0
i have hit the same issue. this must be some kind of bug with type inference in the eclipse compiler. i found that it also compiles when manually extracting the function within maptoobj:
private void populatecells(group root, final spriteview.mary mary) {
intfunction<stream<rectangle>> mapper = i -> intstream.range(0,
vertical_cells)
.maptoobj(
j -> {
rectangle rect = new rectangle(i * cell_size, j
* cell_size, cell_size, cell_size);
rect.setfill(color.rgb(0, 0, 0, 0));
rect.setstroketype(stroketype.inside);
rect.setstroke(color.black);
rect.setonmousepressed(e -> mary
.moveto(new location(i, j)));
return rect;
});
// gratuitous use of lambdas to do nested iteration!
group cells = new group();
intstream.range(0, horizontal_cells).maptoobj(mapper).flatmap(s -> s)
.foreach(cells.getchildren()::add);
root.getchildren().add(cells);
}
Source: stackoverflow.com
Related Query
- ObservableList<Node> method reference error in Eclipse
- eclipse C++ add reference undefined reference to method error
- "Could not find main method from given launch configuration" error when exporting jar from Eclipse
- Gradle eclipse plugin : Could not find method jcenter() for arguments [] on repository container. See error log for details
- Java 9 Eclipse 4.7 Portable export error "resource not found", "Could not find main method from given launch configuration."
- Eclipse content assist not working when using Method reference inside Stream.map
- eclipse maven Circular placeholder reference Error using profiles
- Error in building eclipse project after update sdk and play services [Unable to execute dex: method ID not in]
- cocos2d-x pure virtual method error only in eclipse
- undefined reference to WinMain Error 1 in eclipse using mingw
- Error "Comparison method violates its general contract!" when installing any Eclipse plugin
- Eclipse claiming error when calling method from external class
- Unsupported major.minor version 51.0 Error With Eclipse When Trying to Reference Jar File
- Firewatir: firewatir returns undefined method error in eclipse
- Syntax error in Eclipse when using static getNames method of JSONObject Java class
- eclipse override method error on java 6, compiler 1.6
- Java Eclipse error method not found in class
- Overriding - reducing visibility of a method as private, eclipse error
- Reference to method is ambiguous in OpenJDK but not Eclipse - why?
- Error with the inflate method of the onCreateOptionsMenu in Android in Eclipse
- Eclipse Error "java.lang.unsatisfiedlinkerror Native method not found"
- Qt C++, Eclipse (on Win 7) - project build failed with "unresolved reference to _Unwind_Resume" error
- The method getBinaryPath() is undefined for the type WebDriverManager error shows in eclipse while i am trying to run appium automation project
- Eclipse crashes with reference count error message cairo_surface_destroy
- Undefined reference error with Eclipse (C++)
- Unable to execute dex: method ID not in [0, 0xffff]: 65536 Error in Eclipse
- error in adding google play services as reference library in eclipse
- Method reference shortcut transformation in Eclipse Luna
- Error When Trying to Do Boolean Method in Eclipse
- eclipse + cdt + mingw + windows error "undefined reference to `WinMain@16'" on build
More Query from same tag
- Scala Error: Could not find or load main class in both Scala IDE and Eclipse
- Despite creating file association, file will not open in my Application
- existing app (java/eclipse/android) to other platform
- In Eclipse, any way to start application in more than one emulator at the same time?
- Problem With running java minecraft & modding in eclipse
- How to trigger click event in Selenium for a link, when used with Java driver?
- Using intellij to debug eclipse plugins
- Debugging jar file with source code attached in eclipse
- Eclipse plugin does not work on some computer
- Update EGit to 2.3 or higher in Spring Tool Suite 3.3.0
- Android - Display a button and text simultaneously
- Testing my Java/Android app - is my setup wrong?
- how to detect if running in osgi container
- Use dependencies from Eclipse p2 repository in a regular Maven build?
- android studio proguard confusion
- Eclipse/Mylyn: use JIRA and Bitbucket?
- Why is a windowOpened event not fired/captured when my Eclipse plug-in starts?
- javafx project that has an fxml document that won't let me inject a label into my controller
- Eclipse outline of Prototype javascript classes
- Eclipse: Unable to find a GPG key for signing (verify through Eclipse)
- Eclipse - use OS environment variable in build path
- How to verify if a resource is of type .c, .h, .s in Eclipse?
- How to change the icon of an Android app in Eclipse?
- Google app engine: maven or eclipse google plugin
- Trouble installing ADT plugin in eclipse (for developing android apps)
- Ctrl+Click shortcut not working in Maven project
- Where is the "update site" list stored in the filesystem?
- Old feature file path is used even after updating a new path
- In Eclipse's text editors, is it possible to have tabs not look the same as spaces
- How to get shutdown hook to execute on a process launched from Eclipse