Four Stars

Java 1.8 syntax

Hi all,

 

I'm trying to generate a job in TAC which includes some Java 1.8 lambda syntax code. It compiles and runs nicely in Studio, but whenever I try to generate it on TAC, I get this error:

 

Lambda expressions are allowed only at source level 1.8 or above

 

TAC is running on Java 1.8 as well, so I wonder why it doesn't accept the new syntax.

 

Any insights?

5 REPLIES
Moderator

Re: Java 1.8 syntax

Hi,

Are you using the same Java 1.8 build version on both your studio and TAC? Could you please check  if the released JDK 8 is with lambdas or without?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Java 1.8 syntax

Yeah, I made sure the exact same version and patch level of JDK are both on the local machine and TAC.

I'm not sure though if there are Java 1.8 releases with support for lambda syntax explicitely excluded - and if there are, I don't know how to check that.
Moderator

Re: Java 1.8 syntax

Hello,

Did you deploy a .zip on TAC?

With your subscription solution, could you please create a case on talend support portal so that we can give you a remote assistance through support cycle with priority?

 

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Java 1.8 syntax

No. When I build the job locally on my own computer, then it works both locally and when installed in a zip or jar, it runs on the execution server too.

However, our workflow is to save jobs into a git repository, and have TAC generate (build) them on the server. That's the point where it fails for some reason (see the thread-starter post), despite it's JDK 1.8 installed on the server side also.
Moderator

Re: Java 1.8 syntax

Hi,

Could you please create a case on talend support portal so that we can give you a remote assistance(webex) through support cycle with priority?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.