0

I am using IntelliJ for a Java project. My project structure looks something like this:

Crawler
    |----.idea
    |----lib
            jsoup-1.7.3.jar
    |----out
        |----production
            |----Crawler
                |----App
                    App.class
    |----src
        |----App
            App.java
    Crawler.iml

Now when I run the app from within IntelliJ, it loads the external lib and runs perfectly.

How should I run it from the command-line?

1 Answer 1

1

Unix (Linux, MacOS):

cd <path>/Crawler
java -cp out/production/Crawler:lib/jsoup-1.7.3.jar App.App

Windows:

cd <path>\Crawler
java -cp "out\production\Crawler;lib\jsoup-1.7.3.jar" App.App
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.