Why Java program compiles and runs in IntelliJ but on terminal does not find dependencies?2019 Community Moderator ElectionWhy is javac 1.5 running so slowly compared with the Eclipse compiler?Why does Java have transient fields?IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeMaven does not find JUnit tests to runHow to change Java version for Maven in IntelliJ?How to run my program in mac terminal (Intellij)how does a Java program find its Maven packages?IntelliJ IDEA - Maven Can't Find JAVA_HOME After Java 11 InstallWhy do you have to add a classpath when trying to execute a java program from the embedded terminal in intellij?Unable to build or run tests in Intellij for Java project

What if I store 10TB on azure servers and then keep the vm powered off?

Whom do I have to contact for a ticket refund in case of denied boarding (in the EU)?

Is there any relevance to Thor getting his hair cut other than comedic value?

Pure Functions: Does "No Side Effects" Imply "Always Same Output, Given Same Input"?

If a druid in Wild Shape swallows a creature whole, then turns back to her normal form, what happens?

What type of postprocessing gives the effect of people standing out

The need of reserving one's ability in job interviews

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

Understanding Kramnik's play in game 1 of Candidates 2018

What to do when being responsible for data protection in your lab, yet advice is ignored?

What can I substitute for soda pop in a sweet pork recipe?

What does 'open position for bachelor project' actually mean?

Easy code troubleshooting in wordpress

When was drinking water recognized as crucial in marathon running?

Rationale to prefer local variables over instance variables?

What is the difference between ashamed and shamed?

What does 'acting greedily' mean?

What is the wife of a henpecked husband called?

Reason why dimensional travelling would be restricted

How to kill a localhost:8080

Did Amazon pay $0 in taxes last year?

What's the difference between a cart and a wagon?

Is there a German word for “analytics”?

Did 5.25" floppies undergo a change in magnetic coating?



Why Java program compiles and runs in IntelliJ but on terminal does not find dependencies?



2019 Community Moderator ElectionWhy is javac 1.5 running so slowly compared with the Eclipse compiler?Why does Java have transient fields?IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeMaven does not find JUnit tests to runHow to change Java version for Maven in IntelliJ?How to run my program in mac terminal (Intellij)how does a Java program find its Maven packages?IntelliJ IDEA - Maven Can't Find JAVA_HOME After Java 11 InstallWhy do you have to add a classpath when trying to execute a java program from the embedded terminal in intellij?Unable to build or run tests in Intellij for Java project










0















I have a Java project on IntelliJ about language detection. I have used this package: https://github.com/optimaize/language-detector and everything works fine in IntelliJ. Infact the program compiles and runs without any problem.



Sadly when I try to compile it with




javac Main.java




on terminal it says




error: package com.optimaize.langdetect does not exist




Mainly I am using my laptop in development, and I would like to run the code on a DigitalOcean server. How can I fix this?
I have thought about the JAVA environment variables and paths, or the maven dependencies, but they should be taken care of by IntelliJ, right?



Thanks for any help!










share|improve this question



















  • 4





    most likely you configured the dependencies in your ide, and not on a global classpath

    – Stultuske
    1 hour ago











  • make a runnable jar and try again

    – Asier Aranbarri
    58 mins ago











  • @AsierAranbarri how is one supposed to create a runnable jar if it doesn't compile?

    – Stultuske
    58 mins ago











  • @AsierAranbarri yes, and now he is trying to COMPILE it through the prompt, that's where the error occurs. As the op stated in "Sadly when I try to compile it on terminal it says error: package com.optimaize.langdetect does not exist". the question is about why it compiles in the IDE and not through the terminal, not about runtime issues.

    – Stultuske
    54 mins ago






  • 1





    @AsierAranbarri well ... it happens :)

    – Stultuske
    51 mins ago















0















I have a Java project on IntelliJ about language detection. I have used this package: https://github.com/optimaize/language-detector and everything works fine in IntelliJ. Infact the program compiles and runs without any problem.



Sadly when I try to compile it with




javac Main.java




on terminal it says




error: package com.optimaize.langdetect does not exist




Mainly I am using my laptop in development, and I would like to run the code on a DigitalOcean server. How can I fix this?
I have thought about the JAVA environment variables and paths, or the maven dependencies, but they should be taken care of by IntelliJ, right?



Thanks for any help!










share|improve this question



















  • 4





    most likely you configured the dependencies in your ide, and not on a global classpath

    – Stultuske
    1 hour ago











  • make a runnable jar and try again

    – Asier Aranbarri
    58 mins ago











  • @AsierAranbarri how is one supposed to create a runnable jar if it doesn't compile?

    – Stultuske
    58 mins ago











  • @AsierAranbarri yes, and now he is trying to COMPILE it through the prompt, that's where the error occurs. As the op stated in "Sadly when I try to compile it on terminal it says error: package com.optimaize.langdetect does not exist". the question is about why it compiles in the IDE and not through the terminal, not about runtime issues.

    – Stultuske
    54 mins ago






  • 1





    @AsierAranbarri well ... it happens :)

    – Stultuske
    51 mins ago













0












0








0








I have a Java project on IntelliJ about language detection. I have used this package: https://github.com/optimaize/language-detector and everything works fine in IntelliJ. Infact the program compiles and runs without any problem.



Sadly when I try to compile it with




javac Main.java




on terminal it says




error: package com.optimaize.langdetect does not exist




Mainly I am using my laptop in development, and I would like to run the code on a DigitalOcean server. How can I fix this?
I have thought about the JAVA environment variables and paths, or the maven dependencies, but they should be taken care of by IntelliJ, right?



Thanks for any help!










share|improve this question
















I have a Java project on IntelliJ about language detection. I have used this package: https://github.com/optimaize/language-detector and everything works fine in IntelliJ. Infact the program compiles and runs without any problem.



Sadly when I try to compile it with




javac Main.java




on terminal it says




error: package com.optimaize.langdetect does not exist




Mainly I am using my laptop in development, and I would like to run the code on a DigitalOcean server. How can I fix this?
I have thought about the JAVA environment variables and paths, or the maven dependencies, but they should be taken care of by IntelliJ, right?



Thanks for any help!







java intellij-idea






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 17 mins ago







Mazzespazze

















asked 1 hour ago









MazzespazzeMazzespazze

45




45







  • 4





    most likely you configured the dependencies in your ide, and not on a global classpath

    – Stultuske
    1 hour ago











  • make a runnable jar and try again

    – Asier Aranbarri
    58 mins ago











  • @AsierAranbarri how is one supposed to create a runnable jar if it doesn't compile?

    – Stultuske
    58 mins ago











  • @AsierAranbarri yes, and now he is trying to COMPILE it through the prompt, that's where the error occurs. As the op stated in "Sadly when I try to compile it on terminal it says error: package com.optimaize.langdetect does not exist". the question is about why it compiles in the IDE and not through the terminal, not about runtime issues.

    – Stultuske
    54 mins ago






  • 1





    @AsierAranbarri well ... it happens :)

    – Stultuske
    51 mins ago












  • 4





    most likely you configured the dependencies in your ide, and not on a global classpath

    – Stultuske
    1 hour ago











  • make a runnable jar and try again

    – Asier Aranbarri
    58 mins ago











  • @AsierAranbarri how is one supposed to create a runnable jar if it doesn't compile?

    – Stultuske
    58 mins ago











  • @AsierAranbarri yes, and now he is trying to COMPILE it through the prompt, that's where the error occurs. As the op stated in "Sadly when I try to compile it on terminal it says error: package com.optimaize.langdetect does not exist". the question is about why it compiles in the IDE and not through the terminal, not about runtime issues.

    – Stultuske
    54 mins ago






  • 1





    @AsierAranbarri well ... it happens :)

    – Stultuske
    51 mins ago







4




4





most likely you configured the dependencies in your ide, and not on a global classpath

– Stultuske
1 hour ago





most likely you configured the dependencies in your ide, and not on a global classpath

– Stultuske
1 hour ago













make a runnable jar and try again

– Asier Aranbarri
58 mins ago





make a runnable jar and try again

– Asier Aranbarri
58 mins ago













@AsierAranbarri how is one supposed to create a runnable jar if it doesn't compile?

– Stultuske
58 mins ago





@AsierAranbarri how is one supposed to create a runnable jar if it doesn't compile?

– Stultuske
58 mins ago













@AsierAranbarri yes, and now he is trying to COMPILE it through the prompt, that's where the error occurs. As the op stated in "Sadly when I try to compile it on terminal it says error: package com.optimaize.langdetect does not exist". the question is about why it compiles in the IDE and not through the terminal, not about runtime issues.

– Stultuske
54 mins ago





@AsierAranbarri yes, and now he is trying to COMPILE it through the prompt, that's where the error occurs. As the op stated in "Sadly when I try to compile it on terminal it says error: package com.optimaize.langdetect does not exist". the question is about why it compiles in the IDE and not through the terminal, not about runtime issues.

– Stultuske
54 mins ago




1




1





@AsierAranbarri well ... it happens :)

– Stultuske
51 mins ago





@AsierAranbarri well ... it happens :)

– Stultuske
51 mins ago












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55001107%2fwhy-java-program-compiles-and-runs-in-intellij-but-on-terminal-does-not-find-dep%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55001107%2fwhy-java-program-compiles-and-runs-in-intellij-but-on-terminal-does-not-find-dep%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Runtime problems in TestNG asserts2019 Community Moderator ElectionHow do you assert that a certain exception is thrown in JUnit 4 tests?differences between 2 JUnit Assert classesHow do I use Assert to verify that an exception has been thrown?Best practice for Python assertWhat is the “assert” function?What does the Java assert keyword do, and when should it be used?What is the use of “assert” in Python?PHPUnit assert that an exception was thrown?What is “assert” in JavaScript?Asserting in testng using containing

(unchecked) unchecked cast required: OnSuccessListener found: Uri2019 Community Moderator ElectionHow do I address unchecked cast warnings?Android AlarmManager for periodical sensor readingWhy don't Java's +=, -=, *=, /= compound assignment operators require casting?I am trying to set alarm on specific time using alarm manager but alarm initiated instantly?setText on button from another activity androidget around of error 'can not resolve symbol'Saving ToggleButton state in ListView by using SharedPreferencesAdding Social Media Share Logic From Firebase in Androidjava.lang.NullPointerException when invoking onLoadFinished()Search Firestore query don't show data in RecycleView

1