java展示目录失败的原因,处理(Java):无法检测到库的原因列表(Linux)

There are apparently numerous reasons why Processing will not detect the installation of an external library.

1) Library installed in wrong folder

The library must be installed in a directory "libraries" in the sketchbook folder, which is probably not in the installation directory. Careful Linux is case sensitive so libraries and Libraries are two different directories, as are sketchbook and Sketchbook.

2) Library installed in correct folder but wrongly referenced

It's possible to confirm the current sketchbook directory used by Processing by looking in "Preferences" in the "File" menu of the Processing editor.

3) Problem with preferences.txt

Preferences.txt allows manual entries to be made. If you don't have a preferences.txt then there's no problem

4) Permissions on the folder itself

5) ??

And that is my question. For some reason, although everything is where it should be, Processing doesn't recognise SoundCipher when it has been dropped in as extracted from a zip file, as downloaded from the net and as instructed by every blog, readme file, etc I can find.

So I'm assuming there's something else that may cause havoc with Processing's ability to detect a library?

OS:

Ubuntu 14 LTS

Error in editor is:

The class SoundCipher does not exist

Error message is:

No library found for arb.soundcipher

No library found for arb.soundcipher.constants

Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.

Sketchbook folder path:

/home/steg/sketchbook

In Preferences, sketchbook path is:

/home/steg/sketchbook

Path to library is:

/home/steg/sketchbook/libraries/soundcipher

Path to source is:

/home/steg/sketchbook/libraries/soundcipher/src

All other directories in soundcipher folder are as is... Yet the error is not related to soundcipher seemingly.

Code in Sketch:

import arb.soundcipher.*;

import arb.soundcipher.constants.*;

SoundCipher sc = new SoundCipher(this);

解决方案

The easiest way to add a library to a sketch is to simply drag the library jar onto the Processing editor.

You don't have to install the library in the libraries directory. Just find SoundCipher.jar and drag it directly onto your sketch in the Processing editor.

That will add the library to your sketch, and you'll be able to use the SoundCipher class.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值