Menu

japi2 and Debian ... Japi2.java not found

2021-04-16
2021-04-19
  • Erich Mueller

    Erich Mueller - 2021-04-16

    erich@santiago:~/cobol$ java -jar /home/erich/cobol/japi/swing/src_java/src/japi2.jar
    Fehler: Hauptklasse de.japi.Japi2 konnte nicht gefunden oder geladen werden

    Mainclass not found .... but it is !!! there
    i.e. folders de and japi and File Japi2.java do exist; moving the .java files to higher folders shows no effect

    with JAPI.jar (older version) it works

    it looks like everybody uses the windows version so far
    is there somebody with LINUX experience ? who has an idea what I m doing wrong ?

    btw. japi especially with its wonderful manual is really nice

     
  • Rich Di Iulio

    Rich Di Iulio - 2021-04-16

    Erich,

    I am using it on Linux Mint and Ubuntu as well as Windows. Make sure the symbol pointing to the directory for Japi2.jar. The symbol is COBJAPI_JAPIJAR_HOME I have attached a script I use to setup use of GnuCOBOL.

    Rich Di Iulio

     
  • Erich Mueller

    Erich Mueller - 2021-04-17

    Rich,
    Your script brought me on the way, updated to java-11
    and doing more test and I found:
    erich@santiago:~$ java -jar "JAPI.jar

    ^C
    erich@santiago:~$ java -jar "japi2.jar"
    Error: Unable to access jarfile japi2.jar
    erich@santiago:~$ java -jar "japi2.jar

    so one inverted comma does the job
    thanks a lot Erich

     
  • Erich Mueller

    Erich Mueller - 2021-04-17

    hoops....
    no, that was wrong
    " starts java without anything
    .I .. keep on testing
    Erich

     
  • Rich Di Iulio

    Rich Di Iulio - 2021-04-17

    Erich,

    I am glad to help someone here. I have received so much help from myself.

    I have attached a script that I start/stop/debug the Japi Server. The debug piece is where I within my programs get debug information when I have a problem.

    I am developing a application in Windows 10 and Linux, I have similar scripts for both Windows and Linux. The user I am doing this for, only understands Windows. However, I find developing in Linux is cleaner and faster.

    Rich

     
  • Anonymous

    Anonymous - 2021-04-19

    Rich
    Thanks a lot again I am already using it
    but in my case it only works with JAPI
    and not with japi2
    since having only few experience with Java
    ... do I have to compile the .java files
    in src_java /src? because i still get:
    java -jar japi2.jar
    Fehler: Hauptklasse de.japi.Japi2 konnte nicht gefunden oder geladen werden
    Ursache: java.lang.ClassNotFoundException: de.japi.Japi2

    Thans Erich

     
  • Erich Mueller

    Erich Mueller - 2021-04-19

    Rich
    I think a found something:
    I have 2 japi2.jar files
    swing/src_java/dist 475959 byte
    swing/src_java/ 1.412.284 byte
    which are you using ?
    Thanks Erich

     
    • Rich Di Iulio

      Rich Di Iulio - 2021-04-19

      Erich,

      I am using the one in swing/src_java/japi2.jar. This morning I tried the one in the dist directory and that did not work. Have you compiled the examples in the examples_simple?

      Rich

       
  • László Erdős

    László Erdős - 2021-04-19

    Hi,

    in SVN there are 3 same files with the size 475.959 bytes, and you should have the same in SVN.

    \gnucobol-contrib\trunk\tools\cobjapi\SWING\src_java\JAPI.jar
    \gnucobol-contrib\trunk\tools\cobjapi\SWING\src_java\japi2.jar
    \gnucobol-contrib\trunk\tools\cobjapi\SWING\src_java\dist\japi2.jar

    The JAPI2 has a NetBeans project configuration, and I compile it with NetBeans IDE 8.2.
    After compile the file will be created in "dist", then I copy it under src_java.
    Earlier (AWT Japi) was named it as JAPI.jar, therefore I copy japi2.jar into JAPI.jar also.
    But all the same.

    Last time I tested it only on Windows with cygwin, and not with Linux.

    László

     
  • Erich Mueller

    Erich Mueller - 2021-04-19

    Hi Rich, László
    my japi2.jar from ../dist works fine now
    Yes I compiled all the examples and they worked out of the box but with JAPI.jar
    which is - as I understood - the older version.

    At the moment evrything is o.k
    Thanks for your help Erich

     

Anonymous
Anonymous

Add attachments
Cancel