NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

I can't use javax package

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
JuanKiller69



Joined: 06 Jul 2010
Posts: 3

PostPosted: Tue Jul 06, 2010 6:18 pm    Post subject: I can't use javax package Reply with quote

Hello... this is my first post...

Well I am new at java programming... I've using netbeans to practice my exersises in Java and so... what I want to ask... is how can I use the javax package? because I need it to program something in JSP, it's a webpage with an email box. Anyway, NetBeans doesn't let me use the package javax.*; What can I do?
I am using Tomcat 6.0 and I want to compile my class and put it into the folder of my webapplication...

Thanks for help!
Back to top
emiddio



Joined: 07 Sep 2009
Posts: 233

PostPosted: Tue Jul 06, 2010 7:38 pm    Post subject: Re: I can't use javax package Reply with quote

just guessing -- i have never used:
import javax.*

i have to go farther down the tree of packages to specify a particluar
one -- not try to import
them all.

also -- could be you need something from javaEE, not java SE;

gary

----- Original Message -----
From: "JuanKiller69" <address-removed>
To: <address-removed>
Sent: Tuesday, July 06, 2010 11:18 AM
Subject: [nbj2ee] I can't use javax package


Quote:
Hello... this is my first post...

Well I am new at java programming... I've using netbeans to practice my
exersises in Java and so... what I want to ask... is how can I use the
javax package? because I need it to program something in JSP, it's a
webpage with an email box. Anyway, NetBeans doesn't let me use the package
javax.*; What can I do?
I am using Tomcat 6.0 and I want to compile my class and put it into the
folder of my webapplication...

Thanks for help!



Back to top
JuanKiller69



Joined: 06 Jul 2010
Posts: 3

PostPosted: Tue Jul 06, 2010 8:13 pm    Post subject: Reply with quote

Hello, thanks...

The packages I gotta use are...

javax.mail.*;
javax.mail.internet.*;
javax.mail.event.*;

and well... I've installed J2EE SKD :/ and I don't know what else to do damn it...
Back to top
emiddio



Joined: 07 Sep 2009
Posts: 233

PostPosted: Tue Jul 06, 2010 9:33 pm    Post subject: Re: I can't use javax package Reply with quote

those packages are part of javax.mail

and you have to add the jar that contains them to your project.

for glassfish v2ur2, and gfv301 -- the jar is mail.jar

located in lib of gfv2, and modules of gfv3,

or you can go to the javamail website and find them.

you have to get used to finding jars you might need -- not everything is
bundled into
a single easy to use super jar file.

you will run into this type of problem hundreds, thousands of times -- so
get used to it.

gary


----- Original Message -----
From: "JuanKiller69" <address-removed>
To: <address-removed>
Sent: Tuesday, July 06, 2010 1:13 PM
Subject: [nbj2ee] I can't use javax package


Quote:
Hello, thanks...

The packages I gotta use are...

javax.mail.*;
javax.mail.internet.*;
javax.mail.event.*;

and well... I've installed J2EE SKD :/ and I don't know what else to do
damn it...



Back to top
JuanKiller69



Joined: 06 Jul 2010
Posts: 3

PostPosted: Wed Jul 07, 2010 1:06 am    Post subject: Reply with quote

Ok, man... Thank you... the problem is solved...

This is what I did, in case someone else has the same doubt.

You create a new project in NetBeans... there in your project browser you will find a folder called 'libraries'... there you just right click, add jar, and then look for the JAR you need, in my case mail.jar, you can find it in.
C:\glassfishv3\glassfish\modules
or you can download it directly from the sun website.

Thank you for your replies...

See you latter.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo