Caused by: java.lang.RuntimeException: Could not find runtime in any of:

3585
4
11-26-2017 12:15 AM
AlexandrOrlovezky
New Contributor

Hello!


I start to write program on updated version 100.1.
From IDE it's work fun, but when I build jar and try to execute him, I have this error.
When I write on 100.0 I'm don't have this problem.
I'm work with very easy IDE "bluej", so I manual put ArcGIS files to the build.
I try to use Intellij IDEA with Gradle, I'm use next script:

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'application'
//apply the ArcGIS Java SDK Plug-in for Gradle With_3D-Add_Graphics-Surface_Placement
apply plugin: 'com.esri.arcgisruntime.java'

buildscript {
    repositories { maven { url 'https://esri.bintray.com/arcgis' } }
    dependencies { classpath 'com.esri.arcgisruntime:gradle-arcgis-java-plugin:1.0.0' }
}

arcgis.version = '100.1.0'

// download javadoc
idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }

}

But IDEA give me next message:

Unindexed remote maven repositories found. Disable...
  The following repositories used in your gradle projects were not indexed yet:
https://esri.bintray.com/arcgis
  If you want to use dependency completion for these repositories artifacts,
  Open Repositories List, select required repositories and press "Update" button

Help me please.

Best regards!

Alex.

0 Kudos
4 Replies
AlexandrOrlovezky
New Contributor

Some update:

My app start from Intellij IDEA with Gradle. I can build jar. But when I try execute I have: "Caused by: java.lang.RuntimeException: Could not find runtime in any of:...."

0 Kudos
EricBader
Occasional Contributor III

Hi Alex,

Maybe you figured out the problem already, but just in case...

You'll need to copy the Runtime dependent libraries to where your application's runnable jar file is.

You can find more information about that here:

Deploy your app—ArcGIS Runtime SDK for Java | ArcGIS for Developers 

for example, (if you've used the gradle plugin to get the SDK) in your home directory, there should be a .arcgis folder. In that folder, under the folder with the name of the version you are using, you'll find 'jniLibs' and 'resources' folders. These need to be copied over to the folder where your jar file resides.

Hope this helps!

0 Kudos
AlexandrOrlovezky
New Contributor

Hello Eric,

Yes, I'm  put him (jniLibs and resources) to the folder where resides my jar...

For now, I'm not solve this problem and can to start my program just from IDEA.

0 Kudos
DaveWhitla
New Contributor III

Is there some reason why ArcGIS can't load native libraries from the LD_LOADER_PATH like every other Java framework calling native code? e.g JavaFX All this path mangling with hard coded references to the local filesystem (of the development machine) is pretty strange and just creates another yak to shave when trying to build this library into a production application.

0 Kudos