Hello everyone. I am getting a

java.lang.NoClassDefFoundError: gnu/regexp/REException'

when I run my code. Is there any way around this? I understand it has something to do with a class not being in the write path. I'm using BlueJ as my IDE and I'm trying to use the methods in someone's file that they made (it was from a 'lib' file of a zip that I downloaded, and in .jar format). Thanks in advance.

Recommended Answers

All 8 Replies

Can you post your code? Also are you sure that mentioned library was added to your project? (Each IDE has it's own way how to do this)

I think mny code would be much too long to post on here, but here is a bit:

theRobot.drag(but, toX, toY, InputEvent.BUTTON2_MASK);
theRobot.drop(but, toX, toY);

and yes, I'm sure. It compiles and runs up until i use a method from that library.

and yes, I'm sure. It compiles and runs up until i use a method from that library.

If it compiles and runs before you try to use methods from the library, chances are it can't find the library. So are you 100% sure you have the library in the correct place? I have never used BlueJ so I can't help you in that regard.

I used BlueJ to import the jar and it says the jar is loaded.

Do you have the GNU Regex Java library jars in your runtime class-path? It seems that the JAR which you got in turn depends on GNU regex library so having a JAR for the same in your classpath is a requirement.

Check if the classpath is appropriately set to the program folder ..

~sos~ I think you're correct, however I can't get the download link to work. I searched it on google but couldn't find it elsewhere.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.