[nfbcs] Help with Jaws API for Java project

Timothy Breitenfeldt timothyjb310 at gmail.com
Fri Sep 7 16:38:39 UTC 2018


My Apologies, I sent the last email only to Glen.

Thank you for the resource Glen. I looked into com4j, and I think it
could help. It looks like I have to generate a type library from a com
library, then from that, I can generate the java classes that I can
import as normal. Is the FSAPI.dll the com library? How do I generate
a type library?
For java, this seems like a lot of work to access com objects, it
seems to me that it would be easier to work through the java native
interface and the dll. Can't I access the Jaws API through the dll,
the same way I am accessing NVDA's API, just by including the dll in
with my package, and calling into it from my code?
I see why it would usually easier to access jaws through the com
object most of the time, but when dealing with a language like Java
that doesn't make it easy, it seems like less of a headache, and less
overhead to just work through the java native interface.
Also, My only references for the Jaws API are the link I mentioned in
my first email and a python library that is accessing the Jaws API
(accessible_output2).
Is there official documentation on the Jaws API?

Thanks,

TJ Breitenfeldt

On 9/6/18, Timothy Breitenfeldt <timothyjb310 at gmail.com> wrote:
> Thank you for the resource Glen. I looked into com4j, and I think it
> could help. It looks like I have to generate a type library from a com
> library, then from that, I can generate the java classes that I can
> import as normal. Is the FSAPI.dll the com library? How do I generate
> a type library?
>
> For java, this seems like a lot of work to access com objects, it
> seems to me that it would be easier to work through the java native
> interface and the dll. Can't I access the Jaws API through the dll,
> the same way I am accessing NVDA's API, just by including the dll in
> with my package, and calling into it from my code?
> I see why it would usually easier to access jaws through the com
> object most of the time, but when dealing with a language like Java
> that doesn't make it easy, it seems like less of a headache, and less
> overhead to just work through the java native interface.
>
> Also, My only references for the Jaws API are the link I mentioned in
> my first email and a python library that is accessing the Jaws API
> (accessible_output2).
> Is there official documentation on the Jaws API?
>
> Thanks,
>
> TJ Breitenfeldt
>
> On 9/5/18, Glen Gordon <GGordon at vfogroup.com> wrote:
>> Tim,
>>
>> I  suggest that you consider using Com4J.
>> I've not used it but have looked at its source code which is well
>> written.
>> There's a tutorial at
>> https://github.com/kohsuke/com4j/blob/master/src/site/markdown/tutorial.md.
>>
>> --Glen
>>
>> P.S. There are two versions of FSApi: one for 32-bit and the other for
>> 64-bit processes.
>>
>> Glen Gordon
>> VFO | Vice President & Chief Technology Officer
>> 11800 31st Court North, St. Petersburg, FL 33716
>> T 727-299-6230
>> ggordon at vfo-group.com
>> www.vfo-group.com
>>
>>
>> -----Original Message-----
>> From: nfbcs <nfbcs-bounces at nfbnet.org> On Behalf Of Timothy Breitenfeldt
>> via
>> nfbcs
>> Sent: Wednesday, September 5, 2018 2:36 PM
>> To: Doug Lee <dgl at dlee.org>; Timothy Breitenfeldt
>> <timothyjb310 at gmail.com>;
>> NFB in Computer Science Mailing List <nfbcs at nfbnet.org>
>> Cc: Timothy Breitenfeldt <timothyjb310 at gmail.com>
>> Subject: Re: [nfbcs] Help with Jaws API for Java project
>>
>> So, I am having a really tough time getting java to work with ms com
>> objects. A lot of the documentation is old. Does anyone know how to work
>> with com objects in java, or can someone shed some light on my issues
>> with
>> using the FSAPI.dll.
>>
>> Also, thank you for the path to the dll , however , I did see that one,
>> there is also anFSAPI.dll in :
>> C:\Program Files (x86)\Freedom Scientific\Shared\FSAPI\1.0
>>
>> I am not sure if this is different or if this is the 32 -bit version.
>> I do need both the 32 and 64 bit dlls though.
>>
>> TJ Breitenfeldt
>>
>> On 9/5/18, Doug Lee <dgl at dlee.org> wrote:
>>> The FSAPI.dll file is in C:\Program Files\Freedom
>>> Scientific\Shared\FSAPI\1.0
>>>
>>> I don't know anything about doing COM from Java specifically.
>>>
>>> On Tue, Sep 04, 2018 at 10:33:34PM -0700, Timothy Breitenfeldt wrote:
>>> Thank you for the quick reply, , so I am not familiar with dealing
>>> with com objects especially in java. After some research, it looks
>>> like I need to first run the javatlb filename command to create the
>>> type libraries that I can then import. Is this correct? do I need to
>>> run that on the FSAPI.dll file?? if so, which one?
>>>
>>> TJ Breitenfeldt
>>>
>>>
>>> On 9/4/18, Doug Lee via nfbcs <nfbcs at nfbnet.org> wrote:
>>>> You should be able to do this via COM: CreateObject
>>>> "FreedomSci.JAWSAPI"
>>>>
>>>> An interface specification for COM:
>>>>
>>>> dispinterface IJawsApi Member count 6
>>>>     function Disable as Bool
>>>>     function Enable(Bool vbNoDDIHooks) as Bool
>>>>     function RunFunction(BStr FunctionName) as Bool
>>>>         Tells JAWS to execute a function
>>>>     function RunScript(BStr ScriptName) as Bool
>>>>         Tells JAWS to execute a script
>>>>     function SayString(BStr StringToSpeak[, Bool bFlush = True]) as
>>>> Bool
>>>>         Instructs JAWS to speak a particular string
>>>>     sub StopSpeech
>>>>
>>>> On Tue, Sep 04, 2018 at 09:47:37PM -0700, NFBCS mailing list wrote:
>>>> Hi , I am working on a java project similar to accessible _output2
>>>> for python that will provide speech and braille output for various
>>>> screenreaders. I have NVDA working great, now I am working on Jaws.
>>>> This is going to be a cross platform library.
>>>>
>>>> I was looking into the Jaws API,trying to locate the needed library
>>>> and function calls, and I am having some difficulty. I was having a
>>>> tough time finding information on the Jaws API, the only thing I
>>>> could find was a post that was made in reply to someone else
>>>> inquiring about this.
>>>>
>>>> https://www.freelists.org/post/jawsscripts/FW-FSAPIdll
>>>>
>>>> I will note that ,I was unable to figure out how to access jaws
>>>> through the com ports, so I am accessing the function calls through
>>>> the dll. .
>>>>
>>>> There was useful information at that link, but I am unable to get it
>>>> working . My first problem is that I found several files named
>>>> FSAPI.dll on my computer. I am not sure if there is a difference
>>>> between them , if there is a 32-bit and 64-bit dll, or if they are
>>>> all the same. I tried all of ones I could find and all of them said
>>>> the function call SayString(String, boolean) could not be found.
>>>>
>>>> Exception in thread "main" java.lang.UnsatisfiedLinkError: Error
>>>> looking up function 'SayString': The specified procedure could not be
>>>> found.
>>>>
>>>> I can paste the full error if someone wants, but I am not sure if it
>>>> is my java code, as much as it is my lack of information about the
>>>> Jaws API. For completeness though, I am using the third party library
>>>> jna-4.5.1.jar, which is a wrapper for the java native library for
>>>> accessing low level libraries such as dlls.
>>>>
>>>> Does anyone have more information about the Jaws API, and how to make
>>>> calls to it, so that I can pass client strings to Jaws for speech and
>>>> braille?
>>>>
>>>> Thanks,
>>>>
>>>> TJ Breitenfeldtb
>>>>
>>>> _______________________________________________
>>>> nfbcs mailing list
>>>> nfbcs at nfbnet.org
>>>> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
>>>> To unsubscribe, change your list options or get your account info for
>>>> nfbcs:
>>>> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/dgl%40dlee.org
>>>>
>>>> --
>>>> Doug Lee                 dgl at dlee.org
>>>> http://www.dlee.org
>>>> Level Access             doug.lee at LevelAccess.com
>>>> http://www.LevelAccess.com
>>>> "The nice thing about standards is that there are so many of them to
>>>> choose from." -- Andrew Tanenbaum
>>>>
>>>> _______________________________________________
>>>> nfbcs mailing list
>>>> nfbcs at nfbnet.org
>>>> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
>>>> To unsubscribe, change your list options or get your account info for
>>>> nfbcs:
>>>> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/timothyjb310%40gma
>>>> il.com
>>>>
>>>
>>> --
>>> Doug Lee                 dgl at dlee.org                http://www.dlee.org
>>> Level Access             doug.lee at LevelAccess.com
>>> http://www.LevelAccess.com
>>> "While they were saying among themselves it cannot be done, it was
>>> done." --Helen Keller
>>>
>>
>> _______________________________________________
>> nfbcs mailing list
>> nfbcs at nfbnet.org
>> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
>> To unsubscribe, change your list options or get your account info for
>> nfbcs:
>> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/ggordon%40vfogroup.com
>>
>




More information about the NFBCS mailing list