Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:48:21+00:00 2026-06-10T08:48:21+00:00

I am trying to send am email SSL email in Netbeans and I have

  • 0

I am trying to send am email SSL email in Netbeans and I have added both javaee.jar and mail.jar to my project but I am getting the following error

Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/mail/MessagingException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at GUI.CompilerForm.<init>(CompilerForm.java:43)
at Compiler.Main.main(Main.java:19)

From my research I have found out that I am going to have to run my code inside a Java EE container but I have no experience with this. I have looked this up online with little success, only finding out about Java EE containers.

So how do you add code to a Java EE container and then use this in a project?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:48:23+00:00Added an answer on June 10, 2026 at 8:48 am

    how to add Java EE container to java project

    No, please don’t do that. Your sole intent seems to run a Java SE (desktop) application, not a Java EE (web) application. You should not run a Java SE application as a Java EE application.

    You should rather find the right solution for the concrete problem you’re facing instead of asking how to achieve the wrong solution.

    As to your concrete problem,

    Exception in thread “main” java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/mail/MessagingException

    This basically means that the mentioned class (the javax/mail/MessagingException) in the current runtime classpath only contains the class and method signatures, but no concrete code at all. In other words, the mentioned class in the current runtime classpath is empty. And indeed, the javaee.jar which you’ve there (apparently you downloaded it in a wrong attempt to solve compile/import problems) contains basically the abstract Java EE API without any concrete implementation code.

    This is not right. Remove that javaee.jar file altogether. Just the mail.jar which you can download from JavaMail website is sufficient. Your concrete problem is caused because the javaee.jar file, which also contains the javax.mail API (but without implementation), got precedence in classloading over mail.jar file which contains the concrete javax.mail implementation. The javaee.jar file should only be used as a compiletime dependency in Java EE projects, not as a runtime dependency of Java SE projects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send email (Gmail) using python, but I am getting following
I'm getting an error with the following code when trying to send an email.
Although I'm trying to send an email on port 25 without SSL, I'm getting
I am trying to send an e-mail using php script but i am getting
I am trying to send email through gmail using PHPMailer_V5.1. Getting the following error,
I'm trying to send a mail using the GoDaddy email host I have registered
I'm trying to send a simple text mail to my email account but for
I'm using Grails Mail plugin and trying to send email and keep getting: Error
trying to send email form Ruby on Rails but getting this: SocketError in UsersController#create
Does the Pony gem support e-mail with SSL/TLS? I'm trying to (easily) send e-mail

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.