Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3848734
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:44:47+00:00 2026-05-19T16:44:47+00:00

I am working on a project that requires me to understand the basics of

  • 0

I am working on a project that requires me to understand the basics of the Apache Jakarta Regexp package for Java. I am somewhat unfamiliar with how to inlcude libraries in a java class. This is what im trying to run:

import org.apache.regexp.*;

public class regexpTest {
    public static void main(String[] args) {
        RE r = new RE("a*b");
        boolean match =  r.match("aabb");

        if (match){
            System.out.println("yes");
        }
        else{
            System.out.println("no");
        }
    }
}

I have added Documents\jakarta-regexp-1.5\jakarta-regexp-1.5.jar to my class path, but i get to get it to compile without errors, i have to use:

javac -classpath …\jakarta-regexp-1.5\jakarta-regexp-1.5.jar regexpTest.java

that will compile, but when i try to run it like this :

java -classpath …\jakarta-regexp-1.5\jakarta-regexp-1.5.jar regexpTest

I get an error: “Exception thread “main” java.lang.NoClassDefFoundError: regexpTest”

Any ideas on what im doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:44:47+00:00Added an answer on May 19, 2026 at 4:44 pm

    Is the current directory in your classpath?

    http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html

    The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include “.” in the new settings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a project that requires me to generate a java .class
I'm working on a project that requires to convert html email into text. Below
I am working on a project that requires me to define a DSL. Since
I'm working on a project that requires a fair bit of inserting/updating rows in
I am working on a project that requires some image processing. The front end
Currently am working on a project that requires me to create some XML for
I'm working on a project that requires me to programmatically create MySQL users from
I'm working on a project that requires a Web-based workflow application. We're now evaluating
I am currently working on a project that requires me to display PDF documents
I am currently working on a project that requires the rackup command on ubuntu

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.