JBACI java编译错误

发布于 2024-12-07 21:37:29 字数 1460 浏览 1 评论 0原文

我试图用 JBACI 做我的信号作业,但我无法使用它(经过很长的步骤使其运行,我确信我做对了),因为终端向我显示 IO 错误。我正在尝试对以下代码进行采样:

// Demonstate jBACI graphics; without barrier program.
#include "gdefs.cm"
const
int SQUARE1 = 1;    int SQUARE2 = 2;       
int BARRER = 3;     int DELTA = 11;    int Xfinal = 600;

void MoveS1() {
    int i=0,r;
    while (i <= Xfinal) {
        r = random(DELTA);
        i = i + r;
        moveby(SQUARE1, r, 0);
    }
}

void MoveS2() {
    int i=0,r;
    while (i <= Xfinal) {
        r = random(DELTA);
        i = i + r;
        moveby(SQUARE2, r, 0);           
    }
}

void main() {
    create(SQUARE1, RECTANGLE, RED,   30, 50,  30, 30);
    create(SQUARE2, RECTANGLE, BLUE,  30, 100, 30, 30);
    create(BARRER, LINE, BLACK, 350,10,350,400);
    cobegin {
        MoveS2();MoveS1();
    }
}

并且我在终端中得到以下内容:

root@pochi-ThinkPad-T61:/home/pochi/ProgramasJBACI# java -jar jbaci.jar
I/O error from: /usr/bin/bapas alien.pm  java.io.IOException: Cannot run program          
"/usr/bin/bapas" (in directory "/home/pochi/ProgramasJBACI/examples"): 
java.io.IOException:     error=2, No such file or directory

顺便说一句,我正在使用 JBACI

tnx 进行编译以寻求帮助

,这不是家庭作业我需要知道为什么我无法正确编译...我是否设置了错误的路径? 我也遵循了这个说明:西班牙语...... http://inform.pucp.edu。 pe/~inf232/Semestre-2007-2/Laboratorio-4/index.htm

im trying to do my sempahore homework with JBACI, but i cant use it (after long steps to make it run, im sure i did them right) because terminal shows me an IO error. im trying to sample the following code:

// Demonstate jBACI graphics; without barrier program.
#include "gdefs.cm"
const
int SQUARE1 = 1;    int SQUARE2 = 2;       
int BARRER = 3;     int DELTA = 11;    int Xfinal = 600;

void MoveS1() {
    int i=0,r;
    while (i <= Xfinal) {
        r = random(DELTA);
        i = i + r;
        moveby(SQUARE1, r, 0);
    }
}

void MoveS2() {
    int i=0,r;
    while (i <= Xfinal) {
        r = random(DELTA);
        i = i + r;
        moveby(SQUARE2, r, 0);           
    }
}

void main() {
    create(SQUARE1, RECTANGLE, RED,   30, 50,  30, 30);
    create(SQUARE2, RECTANGLE, BLUE,  30, 100, 30, 30);
    create(BARRER, LINE, BLACK, 350,10,350,400);
    cobegin {
        MoveS2();MoveS1();
    }
}

and i get the following in terminal:

root@pochi-ThinkPad-T61:/home/pochi/ProgramasJBACI# java -jar jbaci.jar
I/O error from: /usr/bin/bapas alien.pm  java.io.IOException: Cannot run program          
"/usr/bin/bapas" (in directory "/home/pochi/ProgramasJBACI/examples"): 
java.io.IOException:     error=2, No such file or directory

btw im compiling with JBACI

tnx for help

this isnt homework I need to know why i cant compile right... did i set a path wrong??
also i followed this instructions: in spanish....
http://inform.pucp.edu.pe/~inf232/Semestre-2007-2/Laboratorio-4/index.htm

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灰色世界里的红玫瑰 2024-12-14 21:37:29

我不知道 JBACI 是什么,但在我看来,当您运行 jar 时,它试图启动另一个进程来启动 /usr/bin/bapas,并且错误表明该文件不存在。您需要先安装 java 命令才能工作。

I don't know what JBACI is, but that looks to me like when you run the jar, it's trying to kick off another process to start /usr/bin/bapas, and the error indicates that file doesn't exist. You'll need to install whatever that is before your java command will work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文