If the time had come and you can easily download and install Eclipse with Java 8 support, great... if not, try this out: Setup Eclipse with Java 8 and Lambda expressions
- Create a Java project
- Make sure you have a Java 8 JDK installed in Eclipse goto: window > preferences > Java > Installed JREs, and if not add it!
- If you would like your entire workspace to be configured to work with Java 8 perform the flowing action in window > preferences. Otherwise perform these on the project properties.
- You would have to make sure that your compiler compliance level match 1.8:
**> Java Compiler, and make sure the compliance level is set to 1.8. - Make sure the Java library used in the project is the Java 8 JDK at: **> Java Build Path
- Go to this link and this link, copy the classes as string(Yeah simply mark it all and copy it)
And now... - Click on a package in your project and paste the text(Yeah simply paste the "text" onto the package in the Package Explorer!)
- Poof... you have a two classes in that package(I just love Eclipse don't you!?).
- It should compile and be executable.
Let me know if you had issues, so I can make this better!
No comments:
Post a Comment