Hi, Riccardo.

I think your problem is that you need to call setOut() on SimpleInterface 
before you do anything
else. This is a dumb requirement, I know. There should be a default value, but 
this is how it
works now.

For a pretty good example of some code that uses SimpleInterface, take a look 
at the code for
sj-eclipse. You can get it from here:

http://sourceforge.net/project/showfiles.php?group_id=89891&package_id=145383

(The code packaged in the release file.)

As for linking the SJ compiled classes up with the source files for easier 
debugging, you don't
have to use ant. Just download the source release and use jar to jar un-jar the 
sj-server.jar file
and then re-jar it with the source files.

Good luck.

--Rob

--- Riccardo Cohen <[EMAIL PROTECTED]> wrote:

> Hi
> I want to congratulate the developers of the simpletools.SimpleInterface api. 
> It is really easy
> to use.
> I've coded a class to access the archive from client side, and have a 
> connection error :
> java.lang.NullPointerException
>          at 
> org.sourcejammer.client.gui.CommandCentral.connectToArchive(Unknown Source)
>          at 
> org.sourcejammer.client.simpletools.SimpleInterface.connect(Unknown Source)
>          at jammerlist.main(jammerlist.java:30)
> Apart from the fact that I do not congratulate the dev team for those 
> numerous null pointer 
> exceptions :) is there any way to have info about the error  ? (the source 
> does not provide a
> jar 
> with both java and class, so the exception cannot give the line where it 
> appears)
> 
> I tried to compile source on unix, but it needs ant, so I downloaded ant but 
> it needs sun jdk
> (i'm 
> using ibm one) so I downloaded sunjdk but it needs libc++6 so i downloaded it 
> but it needs 
> libstdc++-libc6.1-1.so.2 so I forgave :(
> 
> This is my code:
> Thanks
> Riccardo Cohen
> 
> import java.lang.*;
> import java.util.*;
> import java.sql.*;
> import java.io.*;
> import java.net.*;
> 
> import org.sourcejammer.client.simpletools.*;
> import org.sourcejammer.project.view.*;
> 
> public class jammerlist
> {
>    public static void main(String[] args)
>    {
>      boolean fail=false;
>      Project proj=null;
>      if (args.length==0)
>        System.out.println("syntax : jammerlist c:\\jammer\\conf");
>      SimpleInterface si=SimpleInterface.getInstance();
>      fail=(si==null);
>      if (fail)
>        System.out.println("si null");
>      if (!fail)
>      {
>        try{si.setConfDirectory(args[0]);}catch(Exception ex){fail=true;}
>        if (fail)
>          System.out.println("conf err");
>      }
>      if (!fail)
>      {
>        
> try{proj=si.connect("develjava","http://jam.articque.com/servlet/rpcrouter";,
>          "rcohen","zzzz");}catch(Exception 
> ex){ex.printStackTrace();fail=true;}
>        if (fail)
>          System.out.println("connect err");
>      }
>      if (!fail)
>      {
>        fail=proj==null;
>        if (fail)
>          System.out.println("proj null");
>      }
>      if (!fail)
>      {
>        int count=proj.childCount();
>        System.out.println("count="+count);
>      }
>      if (!fail)
>      {
>        try{si.disconnect();}catch(Exception ex){fail=true;}
>        if (fail)
>          System.out.println("disconnect err");
>      }
>      System.out.println(fail?"failed":"ok");
>    }
> }
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO September
> 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> SourceJammer-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sourcejammer-users
> 



                
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
SourceJammer-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sourcejammer-devel

Reply via email to