0

I'm running a Java code and have loaded JDK 1.8 (the latest) and another library (windy1/google-places-api-java from GitHub to connect with GooglePlaces). The problem is that the program stops running after the first iteration of a "for" (the first iteration runs well) and the IDE log says:

Source path "sun\misc\Unsafe.java" was not found.
The reason is likely no opened project with this source file.

I checked in the JDK and the library rt.jar contains sun.misc.Unsafe.class. Could anyone guide me on what to do? The connection with Google is not a problem.

  • 'main' suspended at 'Unsafe.park' in the UNSAFE.park(false, 0L); sentence. – Eduardo Montero Aug 23 '15 at 07:36
  • 1
    The error says that the *source* sun\misc\Unsafe. **java** was not found. Of course the compiled class sun.misc.Unsafe. **class** is there, but its source code is normally not delivered with a jdk. And you should not need it… – Holger Aug 24 '15 at 08:26
  • Thanks. And do you know what should I do? Because the programs stops there. – Eduardo Montero Aug 24 '15 at 12:14
  • 1
    You are mixing two things up. One is your IDE telling you that it doesn’t find said source file, the other is your program hanging in `Unsafe.park`. The code of `Unsafe.park` is of no interest—it’s a `native` method anyway. As it’s unlikely that your program invokes that method directly, you’ll have to go through the stack trace/ call chain and look what your program is actually doing. But we can’t give you a tutorial for using your debugger. – Holger Aug 24 '15 at 13:23
  • I suggest you log a bug with the project for the library you are trying to load. This error message is most likely incorrect and of no use in diagnosis. You shouldn't need access to the source, and in any case, you can't get it for all JVMs. You can get it for the OpenJDK but it might not be for the version you are running. – Peter Lawrey Aug 25 '15 at 07:31

0 Answers0