This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

a little jar problem

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, new here and first I want to say Hello Java Ranchers.
Now this is my problem

I made a program that connects to an imap(mail) server and check if is any new mails, the program is writen in Netbeans, the program work fine when is running under Netbeans, but when I try to make it into jar I have a lot of errors(netbeans errors).
I was wondering if anybody know to build the jar manually.
I used javamail package, I included mail.jar into netbeans, my question is how do I include mail.jar(or the classes that I use from it) into my jar file?

thanks
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the error trace? also Is it a standalone Java program or a web appliction?
 
Steinboch roicho
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a standalone program.

Created dir: netbeans/StudMailAlert/build/classes
Created dir: netbeans/StudMailAlert/build/empty
Compiling 3 source files to netbeans/StudMailAlert/build/classes
//from here is red, the errors
netbeans/StudMailAlert/src/StudMailAlert.java:2: package com.sun.xml.internal.messaging.saaj.packaging.mime does not exist
import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
netbeans/StudMailAlert/src/StudMailAlert.java:59: cannot find symbol
symbol : class MessagingException
location: class StudMailAlert
public static void main(String args[]) throws NoSuchProviderException, MessagingException, javax.mail.MessagingException {
2 errors
netbeans/StudMailAlert/nbproject/build-impl.xml:363: The following error occurred while executing this line:
netbeans/StudMailAlert/nbproject/build-impl.xml:168: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please see the JavaRanch naming policy. Please change your display name to conform with this policy. Thanks!

Note also that it's "strychnine".
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't "include" it in your jar file, you include it on the compilation classpath (and the execution classpath).
 
Marshal
Posts: 27211
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is that a line from your source code? If so, then you are importing the wrong MessagingException class. You should be importing the one from JavaMail's mail.jar file. Its name will be something starting with "javax.mail", probably.
 
Steinboch roicho
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to this but still nothing
http://www.lampos.net/netbeans
 
Steinboch roicho
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, that was it, I deleted, and removed it from throwing and works.
thanks again
 
What are you doing? You are supposed to be reading this tiny ad!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic