Hi! This is my first topic in this forum, and I’m not English native speaker. So it may be difficult for you to understand what the problem is. But please help me.
I want to use
Processing.py from command-line. Refer to this page, I made a directory in
C:\Users\h1rono\Documents\ like this:
process-py |- libraries | |- PixelFlow | |- some files... |- processing-py.jar |- sketch.py
PixelFlow is a third party library of Processing,
processing-py.jar is the
.jar file in this zip file (please see the previous site) and
sketch.py is the main file of a sketch. I installed
PixelFlow in the Processing IDE, find the folder of
PixelFlow, and moved it into
process-py\libraries\. The content of
add_library("PixelFlow") def setup(): size(400, 400, P2D) global F,G F=DwFluid2D(DwPixelFlow(this), width, height, 1) G=createGraphics(width, height, P2D) def draw(): with G.beginDraw(): G.background(255) F.addTemperature(mouseX, height-mouseY, 40, 1) F.update() F.renderFluidTextures(G, 1) image(G,0,0)
Then, I tried this command:
java -jar processing-py.jar sketch.py, received the error:
C:\Users\h1rono\Documents\process-py> java -jar processing-py.jar sketch.py java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\h1rono\Documents\process-py\natives\windows-i586\\gluegen-rt.dll
There is no such a file
process-py\natives\windows-i586\\gluegen-rt.dll. What is wrong, and what should I do to resolve this problem?
I use VSCode of the latest version to write code and PowerShell to run commands. My Java version is:
C:\Users\h1rono\Documents\process-py> java -version java version "1.8.0_261" Java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) Client VM (build 25.261-b12, mixed mode)
new information (26th Aug)
I found that the Java version must be
8u202, so I installed it. I wrote a batch file
@echo off cd /d %~dp0 set PATH=C:\Program Files\Java\jdk1.8.0_202\bin;%PATH% java -version java -jar processing-py.jar sketch.py exit 0
This script runs like this:
@echo off: disable to output script contents.
cd /d %~dp0: set current directory to the folder in which this script is.
- change the file that
- output current Java version
- run sketch
I tried, received like this:
C:\Users\h1rono\Documents\process-py> .\runner.bat java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode) java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\h1rono\Documents\process-py\natives\windows-amd64\\gluegen-rt.dll