Thanks Vladimir's reminder in Jira. It seems like Intellij on mac can just run it without a problem, but the version on linux failed to run the main class thus I thought there was a missing setup.
My PR then can be used as an example for those who's intellij somehow does not work then. -Rui On Thu, Feb 6, 2020 at 1:01 PM Rui Wang <[email protected]> wrote: > I tried to run this example but also got some troubles: > > 1. Intellij cannot run it directly. > 2. "java -cp main_class" was not easy to use. Needed to add some jars to > classpath and it eventually ended up with a "Class Not Found" error. > > > So I create a gradle task for this example and then it can be as easy as > just running command "./gradlew runJdbcExample". Meanwhile it's also easy > to let intellij run it by this command thus debugger becomes usable for > inspecting what's going on under the execution of this example. > > see Jira [1] and PR [2] > > > [1]: https://jira.apache.org/jira/browse/CALCITE-3776 > [2]: https://github.com/apache/calcite/pull/1789 > > > -Rui > > > > On Thu, Feb 6, 2020 at 6:06 AM Michael Mior <[email protected]> wrote: > >> How were you trying to run the code? Note that the mailing list >> doesn't accept attachments, so you'll have to upload the screenshot >> somewhere and include a link. I'm not sure what you mean when you say >> the examples folder is missing from the repository. The link you >> included in your message is to a file in the examples folder. >> -- >> Michael Mior >> [email protected] >> >> Le jeu. 6 févr. 2020 à 08:56, Octopus ZHANG <[email protected]> a >> écrit : >> > >> > Hi all, >> > >> > >> > I fetched an example from the following link: >> > >> https://github.com/apache/calcite/blob/master/core/src/test/java/org/apache/calcite/examples/foodmart/java/JdbcExample.java >> > >> > But I'm not able to run the code, it says cannot find >> "org.apache.calcite.examples.foodmart.java; " and it also shows several >> other errors. I also checked in the github repository that the folder >> "examples" is missing. >> > >> > Please see attach for the source file and the IDE screenshot (the error >> message is in Chinese, but the red color shows the error line). >> > >> > Thank you, >> > >> > -- >> > Yushan >> > >> > >> > >> >
