Java: Importing the RSyntaxTextArea library?

2019-07-21 10:46发布

I need to import the RSyntaxTextArea to a project of mine, but i can't seem to get it to work!

The homepage is at: http://fifesoft.com/rsyntaxtextarea/ And the download: http://sourceforge.net/projects/rsyntaxtextarea/

But when i download it i get it as a .zip file, not a .jar as a typical library would be.

I'm using netbeans, and i've tried rightclicking on "Libraries" -> add JAR/Folder. But when i try to access something from the project i can't import it.

I need to import the following:

import org.fife.ui.rtextarea.*;
import org.fife.ui.rsyntaxtextarea.*;

It's probably a stupid mistake by me, but i've been struggling with it for a day now and i really want to get it working. Any help is really appreciated!

Thanks!

2条回答
姐就是有狂的资本
2楼-- · 2019-07-21 11:26

You can also use a maven dependency:

<dependency>
    <groupId>com.fifesoft</groupId>
    <artifactId>rsyntaxtextarea</artifactId>
    <version>LATEST</version>
</dependency>
查看更多
爷、活的狠高调
3楼-- · 2019-07-21 11:39

If you extract the zip you will see that the source code lies in src/org/fife/. I don't use Netbeans but you should be able to import that folder after extracting the data.

查看更多
登录 后发表回答