Hi Lorenz, Thank you for the support - I'm still getting oriented.
Based on Andys feedback I added the environmental variable for classpath with '...\lib\*' to include all the jars in the directory. I've also tried running it like you mentioned: javac -cp <THE_CLASSPATH_TO_JENA_LIBS_HERE> Tutorial01.java I still get the same errors. Maybe I'm misunderstanding the directories, file paths, and files I need to configure for Jena on a Mac. This could be a lower level of information than what most first time Jena users need. Currently all the paths point to the bin and lib directory in the main folder. The jar files in the lib directory all have names which include version numbers. Nothing is pointed to the bat directory. I'm running the file from terminal in the same directory as the file. Does anything seem weird with this set up? Do I need to rename files in the lib directory? Should I point to the bat directory or execute those files? Thank you for your patience! Louis More info below. In Mac I have set JENA_HOME and JENAROOT set to the main directory for jena: /Users/username/Documents/jena/apachejena370 I don't know if it makes a difference, but I renamed the directory from: /Users/username/Documents/jena/apache-jena-3.7.0 When adding JENA_HOME to the PATH I included did so as: export PATH=$PATH:$JENA_HOME/bin When adding the classpath I did so with: export CLASSPATH=$CLASSPATH:$JENA_HOME/bin/\* On Mon, Apr 23, 2018 at 11:59 PM, Lorenz Buehmann <[email protected] leipzig.de> wrote: > Andy already told you in one of the previous mails that you have to add > the classpath to the Java compiler: > > javac -cp <THE_CLASSPATH_TO_JENA_LIBS_HERE> Tutorial01.java > > > On 24.04.2018 02:31, Cumulative Knowledge wrote: > > Hi all, > > > > I'm having an issue getting Jena up and running on my Mac. I think I have > > everything installed right, but I must be missing something. Details > below > > (and on StackOverflow > > <https://stackoverflow.com/questions/49991720/apache-jena- > installation-issues-with-jenaroot-on-mac> > > ). > > > > Any ideas appreciated. > > > > Thanks! > > > > $ sparql --version > > Jena: VERSION: 3.7.0 Jena: BUILD_DATE: 2018-04-05T11:04:59+0000 ARQ: > > VERSION: 3.7.0 ARQ: BUILD_DATE: 2018-04-05T11:04:59+0000 RIOT: VERSION: > > 3.7.0 RIOT: BUILD_DATE: 2018-04-05T11:04:59+0000 > > > > Here are my current environmental variable settings: > > > > $ echo $JAVA_HOME > > /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home > > > > $JENA_HOME > > /Users/username/Documents/jena/apachejena370 > > > > echo $JENAROOT > > /Users/username/Documents/jena/apachejena370 > > > > $ echo $CLASSPATH > > /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/ > Home/bin:/Users/username/Documents/jena/apachejena370/lib/* > > > > When I run the code: > > > > $ sudo java Tutorial01 > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > org/apache/jena/rdf/model/ModelFactory > > at Tutorial01.main(Tutorial01.java:34) > > Caused by: java.lang.ClassNotFoundException: > > org.apache.jena.rdf.model.ModelFactory > > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > ... 1 more > > > > I've also somehow broken something because javac is no longer working: $ > > sudo javac Tutorial01.java > > > > Tutorial01.java:21: error: package org.apache.jena.rdf.model does not > exist > > import org.apache.jena.rdf.model.*; > > ^ > > Tutorial01.java:22: error: package org.apache.jena.vocabulary does not > exist > > import org.apache.jena.vocabulary.*; > > ^ > > Tutorial01.java:34: error: cannot find symbol > > Model model = ModelFactory.createDefaultModel(); > > ^ > > symbol: class Model > > location: class Tutorial01 > > Tutorial01.java:34: error: cannot find symbol > > Model model = ModelFactory.createDefaultModel(); > > ^ > > symbol: variable ModelFactory > > location: class Tutorial01 > > Tutorial01.java:37: error: cannot find symbol > > Resource johnSmith = model.createResource(personURI); > > ^ > > symbol: class Resource > > location: class Tutorial01 > > Tutorial01.java:40: error: cannot find symbol > > johnSmith.addProperty(VCARD.FN, fullName); > > ^ > > symbol: variable VCARD > > location: class Tutorial01 > > 6 errors > > > >
