Menu

Console shorcuts

Help
2022-04-19
2023-10-15
  • Pablo Jhoan Gonzalez Mora

    Where can I find the shortcuts for console CLIPS, please?
    (clips command; Arch Linux; shell: urxvt)
    I have found these by trial and error:

    • CTRL+U: Delete the current line
    • CTRL + Z: Exit

    Mainly, I would like to use directional arrows to edit a written line.

     

    Last edit: Pablo Jhoan Gonzalez Mora 2022-04-19
    • Gary Riley

      Gary Riley - 2022-04-19

      There are no shortcuts built-in to the console version of CLIPS. Whatever shortcuts you're currently able to use are being provided by the shell you're using. The cross platform Java/Swing IDE for CLIPS that's included with CLIPSJNI allows inline editing, support for arrow keys, and a command history.

       
      👍
      1
      • Pablo Jhoan Gonzalez Mora

        Great. I will try the cross platform Java/Swing IDE for CLIPS that's included with CLIPSJNI.

        Thanks.

         
      • Pablo Jhoan Gonzalez Mora

        After a long time, I could compile CLIPSJNI.
        Several documents helped me. Mainly, this:
        https://github.com/yehia67/Flower-Expert-System

        To launch the IDE:
        java -jar CLIPSIDE.jar

        Thanks, Gary.

         

        Last edit: Pablo Jhoan Gonzalez Mora 2022-04-22
        • Gary Riley

          Gary Riley - 2022-04-22

          What was the missing information in section 7, CLIPS Java Native Interface, of the CLIPS Interfaces Guide that you had to refer to other documention?

           
          • Pablo Jhoan Gonzalez Mora

            Hi, Gary.

            Excuse me for my delay. I was these months out of CLIPS.

            I tried today with the information of the CLIPS Interfaces Guide, under Arch, getting the following output:

            $ make -f makefile.lnx
            
            .
            .
            .
            
            In file included from clipsjni_environment.c:1:
            net_sf_clipsrules_jni_Environment.h:2:10: fatal error: jni.h: No such file or directory
                2 | #include <jni.h>
                  |          ^~~~~~~
            compilation terminated.
            make: *** [makefile.lnx:66: clipsjni_environment.o] Error 1
            

            NOTE: I don't know Java.

             
            • Gary Riley

              Gary Riley - 2022-07-22

              The command you should use to compile the native library is

              make -f makefile.lnx distribution

              where distribution is one of ubuntu, fedora, debian, mint, or centos. This is detailed in section 7.6.3 of the CLIPS 6.4 Interfaces Guide.

              The problem with the instructions on the Flower Expert System link you mentioned is that they're dated. They're for a version of CLIPSJNI from 2015. The problem with the directory paths in the older makefiles for CLIPSJNI is that they were specific to a particular version of the JDK. If you changed the version of the JDK you had to updated the makefile. So if the JAVA_HOME path in the makefile was set to /usr/lib/jvm/java-8-oracle, but your path was actually /usr/lib/jvm/java-8-openjdk-amd64/, you'd have to make that update in the makefile.

              The newer version of the CLIPSJNI makefile sets the JAVA_HOME path to either /usr/lib/jvm/default-java or /usr/lib/jvm/java depending upon which distribution of linux you specify in the make command. These are symbolic links to the directories where Java is located, so when the version of the JDK is updated you don't have to update the directories in the makefile say from java-8-openjdk to java-9-openjdk.

               

              Last edit: Gary Riley 2022-07-22
              • Pablo Jhoan Gonzalez Mora

                The command
                make -f makefile.lnx distribution
                is clearly explained. However, my distro is Arch.

                Very good the improvement regarding the JAVA_HOME path.

                 
  • Mehran Ziadloo

    Mehran Ziadloo - 2023-10-15

    Has there been any progress on this since then? I'm trying to install CLIPS JNI in manjaro (Arch-based distro) but so far, I've failed. The exact same problem mentioned above when I try to compile the library files.

    This is perhaps one of the only cases I see a package that cannot be found as AUR (CLIPS itself is easily installed using an AUR).

     
  • Mehran Ziadloo

    Mehran Ziadloo - 2023-10-15

    Has there been any progress on this since then? I'm trying to install CLIPS JNI in manjaro (Arch-based distro) but so far, I've failed. The exact same problem mentioned above when I try to compile the library files.

    This is perhaps one of the only cases I see a package that cannot be found as AUR (CLIPS itself is easily installed using an AUR).

     

    Last edit: Mehran Ziadloo 2023-10-15
    • Gary Riley

      Gary Riley - 2023-10-15

      Progress on what? The compiler being unable to locate jni.h when the makefile is executed on a manjaro distribution? If so, that's really more of a jdk installation issue than a CLIPS issue. If you can find where jni.h is located in your jdk installation, you can change the path in the makefile.

       

Log in to post a comment.