• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

how to run Java 14 with preview features on Tomcat 9

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have complex SQL queries to write and i want to take advantage of Java 14 preview feature “text block”.
I have properly configured MyEclipse to use Java 14 using the –enable-preview parameter.
I have also added the –enable-preview parameter in Java Windows setting, and done what is recommended here: https://dev.dexterxx.pl/news/8

When I code my Java classes in MyEclipse, it’s fine, I can use text blocks.

However, when I build and run the application on Tomcat 9, I have the following error message:
java.lang.UnsupportedClassVersionError: Preview features are not enabled for com/knowledgeplaces/metalmsapi/SigninResource (class file version 58.65535). Try running with ‘–enable-preview’ (impossible de charger la classe [com.knowledgeplaces.metalmsapi.SigninResource])

Sounds like the feature is not enabled in the complied class file.

Please advise.
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic