On January 27th, this site will be read-only as we migrate to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,519 Users
  • 2,269,752 Discussions
  • 7,916,765 Comments

Discussions

SQLcl.exe giving Java error Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not loa

2»

Answers

  • Gary Graham-Oracle
    Gary Graham-Oracle Member Posts: 3,256 Bronze Crown
    edited Jan 31, 2018 4:26PM

    Oh, sorry, I forgot about a prior forum discussion on that problem.  If you just run sql.bat from the command line you will see...

    C:\Program Files\sqlcl\bin>sql.batEnvironment variable echo on not definedThe syntax of the command is incorrect.

    That other discussion describes in detail a fix for that issue (and others) with the bat file...

    Errors in sql.bat 17.4.0.354.2224

    As for the Modified Date of the sql.exe changing after running it, I do not see that happen on my system. Most likely something "special" going on in your environment.

  • MayhemXTC
    MayhemXTC Member Posts: 1 Green Ribbon
    edited Aug 17, 2018 7:18AM

    I found that this was caused in my env by /tmp being secured and not having execute permission. I resolved this (for me) by setting the tmp location to a different directory (my preference was within the current directory).

    I did this by editing the the sql binary (sqlcl/bin/sql) in two places :

    FIRSTLY:

    function setupArgs {

    #

    # Standard JVM options which are always used

    #

    AddVMOption -Djava.awt.headless=true

    AddVMOption -Dapple.awt.UIElement=true

    AddVMOption -Xss10M

    AddVMOption -Djava.io.tmpdir=$TMPDIR

    }

    SECONDLY, right at the bottom of the file:

    checkADE

    PWD=`pwd`

    TMPDIR="$PWD/tmp"

    if [ ! -d $TMPDIR ]; then

      mkdir $TMPDIR

    fi

    setupArgs

    ...

    ..

    .

    This had me stumped for a while, so I hope its helpful to someone 

    amadis