import-bot (20211) [Avatar] Offline
#1
[Originally posted by kazak]

Atempting textbook example with Visual Age for Java version 3.5

I create a project called "Domino examples"

I create a package called "test
I create a class called "NotesVersion"

I add a main method and add the following code:

public static void main(String args[]){
try{
// Initialize Notes on the current thread
NotesThread.sinitThread();
// (your code goes here)
// Create a session
Session s = NotesFactory.createSession();
System.out.println(s.getNotesVersion()); //print version
}
catch (NotesException e) {
// A Notes specific exception occurred
System.err.println(e.id + " " e.text);
e.printStackTrace(System.err);
}
catch (Exception e) {
e.printStackTrace(System.err); //Generic error, print trace
}
finally {
// Always shut down the Notes thread
NotesThread.stermThread();
}
}

// Note on the line which has C next to NotesVersion class Name I add
import lotus.domino.*;
//in the source code window.

importing the notes.jar and xmlj4.jar

I received this error

The method invoked for type lotus.domino.NotesFactory with arguments() is not
defined.

Can anyone please tell me how to proceed?

Mark
email: kazak@mediaone.net
import-bot (20211) [Avatar] Offline
#2
Re: Visual age for Java 3.5 ( NotesFactory ) importing Notes.jar
[Originally posted by aspatton]

I've upgraded to R5.07, and I receive errors. I am able to import the jar
files with no problems.

You need to specify a server, username, and password for the createSession
method of the NotesFactory class.

NotesFactory.createSession("server", "username", "password");

After doing so, I get an error stating an lsxbe was not found in the library
path. These are in the root domino directory, so I can't figure out this
error. I'll keep digging for an answer...

Tony.
import-bot (20211) [Avatar] Offline
#3
Re: Visual age for Java 3.5 ( NotesFactory ) importing Notes.jar
[Originally posted by kazak]

> I've upgraded to R5.07, and I receive errors. I am able to import the jar
> files with no problems.
>
> You need to specify a server, username, and password for the createSession
> method of the NotesFactory class.
>
> NotesFactory.createSession("server", "username", "password"smilie;
>
> After doing so, I get an error stating an lsxbe was not found in the library
> path. These are in the root domino directory, so I can't figure out this
> error. I'll keep digging for an answer...
>
> Tony.

Thanks Anthony I'll try this also and keep you informed.

Mark