NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
JuanKiller69
Joined: 06 Jul 2010 Posts: 3
|
Posted: Tue Jul 06, 2010 6:18 pm Post subject: I can't use javax package |
|
|
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
|
Posted: Tue Jul 06, 2010 7:38 pm Post subject: Re: I can't use javax package |
|
|
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
|
Posted: Tue Jul 06, 2010 8:13 pm Post subject: |
|
|
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
|
Posted: Tue Jul 06, 2010 9:33 pm Post subject: Re: I can't use javax package |
|
|
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
|
Posted: Wed Jul 07, 2010 1:06 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|