Menu

Bug - OziExplorer is not running?

Help
Sven-Ove
2012-01-21
2013-02-01
  • Sven-Ove

    Sven-Ove - 2012-01-21

    Using the following code:

    public static void main(String[] args) throws OziException {
            System.out.println("Version: "+OziAPI.getApiVersion());
            System.out.println("Ozi-status: " + OziAPI.findOzi());
            OziAPI.saveTrackFile(1, "c:/temp/ozitest/1.plt");
    }
    

    Gives:

    Version: 1.09
    Ozi-status: true
    Exception in thread "main" com.oziexplorer.OziException: OziExplorer is not running
    at com.oziexplorer.OziAPI.saveTrackFile(Native Method)
    at oziautosave.OziAutosave.main(OziAutosave.java:22)
    Java Result: 1

    Is this a bug, or am I doing something wrong?

     
  • Sven-Ove

    Sven-Ove - 2012-01-21

    A little bit more testing:

    System.out.println("Version: " + OziAPI.getApiVersion());
            System.out.println("Ozi-status: " + OziAPI.findOzi());
            System.out.println("Ozi-exepath: " + OziAPI.getExePath());
            System.out.println("Ozi-version: " + OziAPI.getOziVersion());
            OziAPI.closeProgram();
    

    Gives:

    Version: 1.09
    Ozi-status: true
    Ozi-exepath: -1
    Ozi-version: -1
    Exception in thread "main" com.oziexplorer.OziException: OziExplorer is not running
    at com.oziexplorer.OziAPI.addWaypoint(Native Method)
    at com.oziexplorer.WaypointFile.display(WaypointFile.java:249)
    at oziauto.OziAutoload.main(OziAutoload.java:32)
    Java Result: 1

    AND it does close OziExplorer.

    OziExplorer-version is 3.95.5n.
    Compiling/running i Netbeans 7.1 on 64-bit Windows 7.

     
  • Sven-Ove

    Sven-Ove - 2012-01-21

    Adding c:\oziexplorer to the PATH-variable in Windows seems to have solved the problem! :D
    Perhaps there should be a setting in the API for defining what folder OziExplorer is installed, for those not using the default folder?

    Also, I had to set Netbeans to use jdk_home to the 32-bit JDK, cause the DLL didn't support 64-bit.

     
  • Alan Burlison

    Alan Burlison - 2012-01-21

    You need to have OziOexplorer running first before you use the API.  See the original OziExplorer API documentation.

     
  • Sven-Ove

    Sven-Ove - 2012-01-21

    OziExplorer was running (see OziAPI.findOzi() returning "true").
    The problem has been solved - as I hadn't installed OziExplorer in the default directory, the API seemed to fail in finding it.
    Adding c:\oziexplorer to the PATH-systemvariable solved the problem. :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.