Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
donuts238485y@yellow-dog no I'm trying to run the app, bills is fine. I can't run it properly from cmd
-
donuts238485y@yellow-dog yea but somehow not working... Probably a Java issue. Default Java is JRE, for the main app I set JAVA_HOME to the JDK folder but I think the third party component still decides to use the JRE. So app starts but then get a ClassNotFound error when the lib is used.
-
@billgates
Gradle has build deps file that will save you manually specifying the classpath.
If you're manually calling javac, it's tedious. If the jar is present java -cp /path/to/jar:/path/to/jar2:. MyApp.java should work. -
Yeah, manually linking jars is an awful idea, set up a maven or gradle project and just let them do the magic
-
donuts238485y@yellow-dog I got it! But now I feel stupid...
I set CLASSPATH var. Thought it was like PATH, some system var that java always pickup.
Just I guess with the -cp flag it doesn't... So yes the fix was obvious....
And the finale of my day was spending an hour + trying to figure out why a Java program with outside dependency loading runs in Eclipse but not CMD....
rant