OHDSI Home | Forums | Wiki | Github

Use cpt4.jar

Hi there,

I’m new in OHDSI, and maybe I’m asking a basic question, but after unpacking my request file from athenea, I try to use the command “java -Dumls-apikey=xxx -jar cpt4.jar 5” as mention in the e-mail, but unfortunatly it does not work, giving me the following error:
Error: Unable to access jarfile cpt4.jar
I change the xxx by my api key from UMLS but it does not work… I execute the command line into the folder where I unpack my zip file…

I dont see this java package in this folder and I dont know how I can obtain this file…

THanks for your help

@Jordi_Valls Could list the files you do see in your folder?

Of course, these are the files.

I just download the SMQ Standardised MedDRA Queries (MSSO) files from http://athena.ohdsi.org/vocabulary/list


Hello @Jordi_Valls,

Unfortunately the email instructions are a bit misleading here. cpt4.jar is included in the zip file only if the user selected CPT4 vocabulary to download; if not, CPT4 concepts are not included into downloaded files and therefore there’s no need to use cpt4.jar. In your case, just skip this step, all SMQ concepts should have their concept names in place.

Hello, I’m new as well. When I run the java -Dumls-apikey=xxx -jar cpt4.jar 5, replacing xx with my key, I get the message ‘java’ is not recognized as an internal or external command. I’m assume I need to install java? Thanks.

Hi David. Welcome to the family.
Yes, you need Java.

Hi I am new to OHDSI as well. I am trying to get the new vocabularies ready for OMOP to be installed. I tried to run the java -Dumls-apikey=XXXX -jar cpt4.jar 5 command in directory where I unzipped the files (with the API key substituted for the XXXX).

I am getting this: Exception in thread “main” java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/odhsi/utils/cpt/Application, offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:331)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:155)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:714)
at java.net.URLClassLoader.access$400(URLClassLoader.java:93)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1166)
at java.security.AccessController.doPrivileged(AccessController.java:488)
at java.net.URLClassLoader.findClass(URLClassLoader.java:597)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:786)
at java.lang.ClassLoader.loadClass(ClassLoader.java:760)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:326)
at java.lang.ClassLoader.loadClass(ClassLoader.java:741)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

I know I have java installed. Does this mean I need a newer version installed? Does it need to be in the directory where the unzipped files reside? Thanks. Patrice

Try updating your java version. It does not need to be in the directory where the unzipped files reside.

to check java version
java -version

Hi Don,
That worked! Thank you!