So far everything was working perfectly fine. But now, for no reason, you can’t manage to launch OpenRefine. What can you do if console gives you error Failed to use jdatapath and program can’t be opened in browser? Detailed tutorial for verifying and dealing with missing variables in Windows.
Sometimes after launching software in console you can see error refine_server] Failed to use jdatapath to detect user data path: resorting to environment variables. In browser will be automatically opened new tab on standard address 127.0.0.1:3333. But instead of OpenRefine user interface you’ll only see error message saying something like this page is not available or another similar message.
Usually this means that OpenRefine cannot find path to Java installation on your device. Or to be precise, to system variable which OpenRefines uses and which defines the path to Java. In this tutorial I’ll show you how to verify Java installation and variables on your device. Tutorial is primarily focused on operating system Windows 10. But it should be helpful with most of the Windows versions. Everything was tested with OpenRefine 2.6, 2.7 and 2.8 in combination with Java 7, 8 a JDK 8.
1. Java check
First things first. Verify that you have Java installed on your PC. Best place to check is disk C in folder Program Files. Or another folder you use to install software. If you do not have Java, download and install it (see links below). Standard version should be perfectly fine for you. But you can try downloading JDK (Java Developer Kit), we might use it in some future tutorials.
After installing Java try to launch OpenRefine again. If is’t still not working, continue to step 2.
- https://java.com/en/download/ – standard installation
- http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html – JDK
2. System variables check
You have Java installed. But OpenRefine is still not launching and returns jadatapath error. Next step is to check Windows variables.
Open any folder and in the left part of the window locate icon This computer.
Right click on that icon and go to Properties.
In the left part of the new window click on option Advanced system settings.
In system properties window click on lower button Environment Variables.
Now you should be able to see window with variables. In two lists of variables search the one which is called JAVA_HOME. Look into both sections – user and system variables. Value of the variable should be equal to valid path to functional Java installation.
If you couldn’t find this variable you will have to add new one. If it exists, make sure that path to Java installation is valid.
3. Definition and setting of variable
If variable is missing you’ll have to add it. Or existing incorrect variable must be fixed by editing it.
Under the list of system variables click on button New.
Define new variable. Into field variable put name JAVA_HOME. Into field value put path to functional Java or JDK installation. For example C:\Program Files\Java\jdk1.8.0_152. Path can be pasted manually or by buttons for browsing directories or files.
Save new or edited variable by clicking on button OK. Now it’s time to save your work. The next step is rebooting your computer before new variable can take in place and effect.
4. OpenRefine boot test
After rebooting your PC try to launch OpenRefine. It’s possible you’ll still see the jdatapath error. But if you proceeded corretly, program should launch without any further problems. And it should be available at standard address 127.0.0.1:3333.
This shouldn’t be very common problem. It can happen after some Windows updates or in case you’re working with multiple Java installations. I hope this tutorial helped you. In case OpenRefine is still not working for you, the error is somewhere else. More tips will be described in another article.