How to run example on linux

Hi How can I run the example program on Linux.
I am new on Linux.
Any kind of help would be appreciated.


You will first want to download and install Stardog (Linux-specific install directions), and then install Gradle.

After that it should be as easy as following the stardog-examples README.

Thanks for reply.
Good news is I was able to tun gradle compleJava.
Bad news is there is an error in running code below:
gradle execute -PmainClass=com.complexible.stardog.examples.api.ICVExample --info

here is part of error:
Dec 03, 2017 10:31:08 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager enableSessionValidation
INFO: Enabling session validation scheduler…
22:31:09.066 [main] ERROR com.complexible.stardog.StardogKernel - Successfully created database ‘testICVExample’.
Successfully created database ‘testICVExample’.

The data is NOT valid!
Dec 03, 2017 10:31:12 PM org.quartz.core.QuartzScheduler shutdown
INFO: Scheduler ce34cc43-ca04-46a1-b334-180305c776c7_$NON_CLUSTERED shutting down.
Dec 03, 2017 10:31:12 PM org.quartz.core.QuartzScheduler standby
INFO: Scheduler ce34cc43-ca04-46a1-b334-180305c776c7
Dec 03, 2017 10:31:12 PM org.quartz.core.QuartzScheduler shutdown
INFO: Scheduler ce34cc43-ca04-46a1-b334-180305c776c7
$_NON_CLUSTERED shutdown complete.
Exception in thread “main” com.complexible.stardog.StardogLicenseException: Validating external constraints not allowed by license. Only constraints added to the database can be used for validation.

Then I try to use another one as follow:
gradle execute
still error as follow:

Configure project :examples:api
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
(Run with --stacktrace to get the full stack trace of this deprecation warning.)

Task :examples:api:execute FAILED
Error: Main method not found in class, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application

This means you will need to use an Enterprise Trial license to run this instead of a Community one.

AnalyzerFactory contains no main method because it is part of a non-runnable example that is showing you how to create a custom Lucene analyzer.

Any of the runnable example classes will be named * and contain a main method.

1 Like