2

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!

demongolem
  • 9,474
  • 36
  • 90
  • 105
qwerty
  • 35
  • 4

2 Answers2

1

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.

Morten Kristensen
  • 7,412
  • 4
  • 32
  • 52
  • I just tried (for the 999th time), and it wont work for some reason. It says it can't find the package, even though the package is clearly there! Have i missed something? I understand it's hard to help without seeing the error. :( – qwerty Jun 17 '11 at 21:24
  • Another way to solve the problem would be to simply add the code from the project directly to your own project structure. That will work just fine. :) – Morten Kristensen Jun 17 '11 at 21:31
  • Yeah that would be another way, but it's a lot of files i need to include then. I would prefer to get it working the "real" way, this is really bugging me now. :/ I'm tired now so i'm going to bed, hopefully i can focus better tomorrow! Thanks for the help, if you come up with an idea please drop another comment! – qwerty Jun 17 '11 at 21:41
  • If you're still there, do you think you could compile it to a .jar file? I found out i can import and use libraries if they are jar files. – qwerty Jun 18 '11 at 16:58
  • 1
    Yeah, that's no problem. But you could also just download the jar [here](http://sourceforge.net/projects/rsyntaxtextarea/files%2Frsyntaxtextarea%2F1.5.1%2Frsyntaxtextarea_1.5.1.zip/download). This zip file has a jar file inside of it. Just what you need. :) – Morten Kristensen Jun 18 '11 at 17:16
0

You can also use a maven dependency:

<dependency>
    <groupId>com.fifesoft</groupId>
    <artifactId>rsyntaxtextarea</artifactId>
    <version>LATEST</version>
</dependency>
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185