aspose file tools*
The moose likes Beginning Java and the fly likes Import javax.security.auth cannot be resolved Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Import javax.security.auth cannot be resolved" Watch "Import javax.security.auth cannot be resolved" New topic
Author

Import javax.security.auth cannot be resolved

joseph cooper
Ranch Hand

Joined: Nov 08, 2005
Posts: 44
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

Joined: Oct 23, 2005
Posts: 3716
    
    5

Set your class path to include the rt.jar file.


My Blog: Down Home Country Coding with Scott Selikoff
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42612
    
  65
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?


Ping & DNS - my free Android networking tools app
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

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

Joined: Jul 08, 2003
Posts: 24187
    
  34

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?


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Import javax.security.auth cannot be resolved