• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Import javax.security.auth cannot be resolved

 
joseph cooper
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to import javax.security.auth.*; and javax.sucurity.auth.login.*; into my program. I am receiving an error stating that the import javax.security.auth cannot be resolved. I have java version 1.4.2_06. what else do i need??

thanks in advance
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set your class path to include the rt.jar file.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

That is weird, because those packages are part of the standard Java class library - if they aren't found, nothing else should be found either. Does this happen in an IDE or on the command line?
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
That is weird, because those packages are part of the standard Java class library

Does that mean you can compile without setting a class path? I always thought you had to include the java lib directory in your class path? Although, I've gotten lazy in my old age primarily relying on IDEs for class path settings.
[ January 27, 2006: Message edited by: Scott Selikoff ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott --

The best CLASSPATH setting for a newbie is no setting at all, which is roughly equivalent to "%JAVA_HOME%/rt.jar;.".

joseph --

Those packages were introduced in version 1.4 of Java; perhaps you're using something older. What does

javac -J-version

say?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic