Any Netbeans users out there?

  • Thread starter Rob Sang via JavaKB.com
  • Start date
R

Rob Sang via JavaKB.com

I was wondering if anyone here might know how the get Netbeans to pick up
J2EE packages so that it stops putting those annoying red squiggly lines
under every line I write that uses a J2EE class? It keeps trying to
"helpfully" delete all my imports from javax.servlet.* packages.

I know, this isn't a proper Java question, but it's just bugging me sooo
much.
 
T

Thomas Kellerer

I was wondering if anyone here might know how the get Netbeans to pick up
J2EE packages so that it stops putting those annoying red squiggly lines
under every line I write that uses a J2EE class? It keeps trying to
"helpfully" delete all my imports from javax.servlet.* packages.

I know, this isn't a proper Java question, but it's just bugging me sooo
much.

Which version are you using?

Basically you will need to add the J2EE libraries (servlet.jar) to your
classpath inside NetBeans. With 3.6 add a library to the classpath is done using
the "Mount library" feature, with 4.0 you have to add the jar file to your
project definition (Project Properties -> Build -> Compiling Sources -> Add
JAR/Folder)

Thomas
 
R

Rob Sang via JavaKB.com

Thanks for that. I was poking around in the "Library Manager" before that.
What on earth is the Library Manager for if it's not for adding libs to
projects?
 
T

Thomas Kellerer

Thanks for that. I was poking around in the "Library Manager" before that.
What on earth is the Library Manager for if it's not for adding libs to
projects?
You can combine several .jar files into one "Library", and then simply add the
"Library" to your project. Useful for .jar files that you use very often.

If you store your J2EE jars in a central place you can also create a J2EE
library. I think that if you update the library definition then the classpath
for all projects referencing the library will be updated as well.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top