aws / aws-toolkit-eclipse

(End of life: May 31, 2023) AWS Toolkit for Eclipse
http://aws.amazon.com/eclipse
Apache License 2.0
275 stars 179 forks source link

java 11: "Unable to export project" #171

Open srjogdande93 opened 4 years ago

srjogdande93 commented 4 years ago

While uploading the lambda function to AWS showing

Failed to upload project to Lambada Unable to export project [project-name] to jar file

Java version :
java 11.0.4 2019-07-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

image

justinmk3 commented 4 years ago

Are you able to export the project to a jar? That's an Eclipse feature, so if it's failing then that would prevent Lambda upload .

jsoftpro commented 4 years ago

Are you able to export the project to a jar? That's an Eclipse feature, so if it's failing then that would prevent Lambda upload.

I have the same issue, AWS Toolkit allows to upload lambda project only built with Java 8. If change the project build path to Jdk 11 or 12 it fails with error 'Unable to export project ... to jar file'. Export to jar with menu works successfully.

hunterwerlla commented 4 years ago

We currently only support java 8

srjogdande93 commented 4 years ago

Okay, Thanks

asashour commented 4 years ago

I am interested to participate to fix this issue, however I am not fully able to build/run the project due to #174

Appreciate hinting about:

hunterwerlla commented 4 years ago

I am interested to participate to fix this issue, however I am not fully able to build/run the project due to #174

Appreciate hinting about:

* What is the Eclipse version currently used by the team?

* Are there any technical restrictions that prevent supporting Java 11?

Have you tried the updated build instructions? The old ones were missing several things. Additionally, if you are trying to build and run from the IDE, you might have to unload simpledb/rds depending on the plugins installed (they will still build from the command line)

gjblajian commented 3 years ago

I am confused by the fact that this item is still open. I get that Amazon claims this is an Eclipse limitation but they built the toolkit and the upload works fine using Corretto 8. They offer Corretto 11 as LTS so if it is a JDK limitation then it should be one that is easily overcome even if they need to add new code to the toolkit to do so. I understand that 11 removed the JRE but the ability to compile the toolkit into a jar means that the toolkit jar itself could contain the necessary runtime to push the project to AWS. Very disappointed with the lack of tool support here.

renschler commented 3 years ago

This should be called out in the docs. Wasted time trying to get a simple Hello World running, I'm sure I'm not the only one.

kenyons commented 3 years ago

We currently only support java 8

Java 9 was released in 2017. Eclipse has not supported Java 8 for the last 2 versions, so users are stuck. AWS Lambda has supported JDK Coretto 11 for at least a year.

It's really not that complicated, just include the necessary modules. I seriously don't understand what the holdup is on this issue.

eschulma commented 3 years ago

I opened pull request #227 to upgrade the underlying AWS Java SDK, it is a fairly straightforward fix. Apart from Maven the code for the plugin itself required only one line change.

MLaunch commented 3 years ago

I'm still experiencing this issue. Has anyone seen that it was fixed?

hashitha commented 2 years ago

any updates on this, I am running into the same problem