How to import netty to eclipse without pom errors? - eclipse

I want to learn the source code of netty, and I import the source code of netty from github, I use maven to import these code but there are some pom errors here when I import the project:
I searched the Internet but I can't get any useful information.So I have nothing to do but to ask for help.
ps,
I attempt to follow the steps here:
and the solution is :
Set up Eclipse with M2E and Java 7/8
Ensure to use the 64-bit version of Eclipse.
Download os-maven-plugin and put it into /plugins (Eclipse 4.5) or /dropins (Eclipse 4.6) directory to work around the problem where m2e does not evaluate an extension specified in our pom.xml. (Unlike its name, it's both a Maven plugin and an Eclipse plugin.)
Import the project via the 'File → Import... → Existing Maven Projects' menu.
Netty project Maven pom.xml settings dictate use of Java SE 1.6, while implicitly using Java 7/8 (1.7/1.8) features if present. This may result in compilation errors in Eclipse. There are two ways to work around this problem:
Look in the 'Window → Preferences → Installed JRE' menu:
Make sure you have Java 7/8 installation available under 'Installed JRE'
Map this Java 7/8 installation onto Java 6: 'Installed JRE → Execution Environments → Java SE 1.6'
Alternatively, Java 7/8 JRE can be selected on per-project basis for each Netty module.
I follow these steps but I cant't solve this problem.
could you please help me to solve this problem? I look forward to your help.
my OS information:
ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D102
my jdk information:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
my eclipse information:
my maven information:
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /Users/mingxing/development/tools/apache-maven-3.5.0
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"

Related

Running ant tasks in eclipse with Java 1.8 lead to "JRE version less than 11 is not supported. "

With eclipse I get the following error when I execute an ant task with Java 1.8.
"JRE version less than 11 is not supported."
My "external tool configuration" is configured with "Seperate JRE" Eclipse Adoptium jdk-8.0.352.8-hotspot
Anybody knows how to prevent this restriction?
Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2022-12 (4.26.0)
Build id: 20221201-1913

export with jdk 8 still got error when start server

I used eclipse with jdk 8 to export to jar. Yet i still get this error when start my server sfs
Exception in thread "main" java.lang.UnsupportedClassVersionError: sfs2x/extension/mmo/MMORoomDemoExtension$NPCData has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Could someone tell me how to fix.
I tried to uninstalled all java and install jdk8 only. But nothing change.
I had a similar problem, what fixed it for me was making sure that jdk8 was selected as the build jdk for that project (right click on your project in Eclipse and click on properties -> Java build path -> JRE System Libraries -> Workspace Default JRE, make ure that jdk8 is selected) and then recompiling. I was able to delete all .class files before recompiling as well, but that may be difficult if this is a project.
Best of luck.

GWT hello world app does not compile and asks for 'com.google.gwt.core.Core'

I haven't done GWT development for a while and wanted to try again. In my Windows 10, I installed JDK 12 and Eclipse 2019-03. I installed GWT Eclipse Plugin (GWT 2.8.1).
From Eclipse, I created a hello world project this way:
Click on 'New GWT Application Project'
Project name: Gwt5, Package: com.foo, Use default SDK (GWT 2.8.1)
Click on 'GWT Compile Project'
I see this error:
Compiling module com.foo.Gwt5
[ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
I didn't change my gwt.xml. I checked and "com.google.gwt.user.User" is there.
Any suggestion?
When language compliance level or JRE is set to higher than what GWT supports, this error occurs (The error message is not very helpful though).
As of May 2019, GWT supports only up to Java 8, and that is provided by JDK 1.8. For example, to make GWT work with Oracle's JDK, you need to download an older version of JDK (Java SE), than set both the Compiler compliance level and Installed JRE to:
Compiler compliance level: 1.8
JRE Home: C:\Program Files\Java\jdk1.8.0_202\

Playframework 2.3.6 reactive-stocks-java8 template issue in eclipse Luna

I have a problem using Eclipse as IDE for the reactive-stocks-java8 template coming with typesafe-activator-1.2.10
Here are my steps:
Install Eclipse Luna on my Mac.
Default JRE is 1.6, but I have the oracle JDK in /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/ after installing with the standard method. I add this JRE to the alternate JRE of eclipse
Install activator
I've downloaded typesafe-activator-1.2.10.zip, unzip it in a folder, add it to the path to have activator in the command line.
Create the project
$activator new
> reactive-stocks-java8
$cd reactive-stocks-java8/
$java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
$activator
[reactive-stocks-java8] $eclipse with-source=true
In eclipse
I import the project in the standard way (Import / Existing Project into Workspace)
in the java build path, The JRE is the 1.6. I change it to 1.8.0_25
I also have to change the java compiler
In my package explorer or the Problems view, no compilation error, great. Now I click on app/controller/Application.java to open it in the editor. In the editor, I've got some unresolved:
views.html.index cannot be resolved to a type
The type scala.collection.Seq cannot be resolved. It is indirectly referenced from required .class files
What am I missing?
here are the answers from the community
https://groups.google.com/forum/#!topic/play-framework/v6ep7DmfH18

Drools Java 7 support in Eclipse

I created a Drools project in Eclipse (Indigo) configured to use JRE 1.7. But I get an error pointing to my .drl file:
com/sample/DroolsTest$Message : Unsupported major.minor version 51.0
The com.sample.DroolsTest.Message class is imported by the .drl file. The Drools runtime was 5.2.1 (also tried with 5.3.0.Final).
Any help would be appreciated. Thanks.
This exception doesn't seem to have to do anything with Drools in particular, but is a generic Java error. It occurs if you try to execute a Java class with a JRE that is older than the JDK that was used to compile it. For example, if you compiled the class with a JDK7 and then tried to execute it with a JDK6, you would get this error.
Just to detail above answer and comment. I had both JRE6 and JRE7 installed, with JRE7 being the default. I had to do two things to remove the error from the drools sample project.
Set the JRE for the project to 1.6
Project properties->Java Build Path->Libraries. Remove JRE System Library 1.7 and Add Library->JRE System Library->Alternate JRE->JRE6
Set the compiler compliance level for the project at 1.6.
Project properties->Java Compiler->check Enable Project specific settings and set Compiler compliance level at 1.6.