Hello ORMLite Users,
I'm attempting to follow the details on the
Getting Started page to introduce myself to ORMLite. I'm having great difficulty getting the files to even compile.
- I've downloaded both ormlite-jdbc-4.48.jar and ormlite-core-4.48.jar
- I've created Account.java and AccountApp.java based on the code examples (everything is in the same folder)
- I understand I need to use the classpath flag to tell javac where to look for the necessary classes
$ javac -cp .:./ormlite-core-4.48.jar:./ormlite-jdbc-4.48.jar Account.java
yields "cannot find symbol" errors for the DatabaseTable and DatabaseField annotations.
I've tried:
- various imports in Account.java (e.g.: import com.j256.ormlite.table.DatabaseTable; // yields error: package com.j256.ormlite.table does not exist)
- relative classpath references
- absolute classpath references
- -verbose flag to inspect the classpath
- all files in the same directory
- jar files in a different directory
- checking permissions of the jar files and enclosing folder (644 and 755 respectively)
- extracting the jar contents
- different versions of ORMLite
- *-sources.jar options of the jar files
- different versions of javac
- different machines
- different operating systems
- Googling every error message I encounter
- trawling StackOverflow
- trawling the support options mentioned on the ORMLite homepage (hence why I'm now posting here)
I can't figure out why I can't get this file to compile. I know it's probably some tiny detail I'm missing and I'm going to kick myself when it's discovered but right now I'm just stumped.
I can switch to another Java project using derby and compile with relative classpath references without a hitch. What on earth am I doing wrong with ORMLite?! I'm not the most experienced Java programmer, just what I've encountered while using it at university.
Running:
Mac OS X 10.9.5 (13F1112)
javac 1.8.0_60
Any help appreciated,
Alex C.