LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2005, 09:28 PM   #1
borgy_t
LQ Newbie
 
Registered: Feb 2005
Location: philippines
Distribution: red hat 9
Posts: 26

Rep: Reputation: 15
Question jcifs problem:NullPointerException


hello,

i am having problems running my app when using JCIFS. i've traced the error to the following code:

Code:
import jcifs.smb.*;

BufferedReader br;
try {

jcifs.Config.setProperty ( "jcifs.netbios.wins", "xxx.xxx.xxx.xxx" );
br = new BufferedReader( new InputStreamReader (
       new SmbFileInputStream ( "smb://username:password@server/file.txt" ) ) );

...
there are no compile errors but it returns the NullPointerException error when i try to execute the program in Eclipse. i have imported the jcifs library into my classpath properly. can anyone help me about this? thanks.
 
Old 04-17-2005, 10:27 PM   #2
borgy_t
LQ Newbie
 
Registered: Feb 2005
Location: philippines
Distribution: red hat 9
Posts: 26

Original Poster
Rep: Reputation: 15
thanks anyway, but i was able to solve the problem. my string argument in the smbfileinputstream was of the wrong format.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
jsvn fc4 NullPointerException gSalsero Linux - Software 3 06-21-2005 10:09 AM
JCIFS: authenticating user credentials borgy_t Programming 0 04-17-2005 10:29 PM
NullPointerException linux_ub Programming 2 07-26-2004 11:38 AM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM
java.lang.NullPointerException in JDBC test chr15t0 Programming 2 07-07-2003 11:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration