How to install JMapViewer

519 Views Asked by At

I am having an issue using JMapViewer.

import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
                                                  ^ Demo.java:20: error: 
package org.openstreetmap.gui.jmapviewer.interfaces does not exist

How can I get rid of that error and use jmapviewer.

1

There are 1 best solutions below

0
On

Let's say you have following structure

.
|-- Simple.java
`-- jar
    `-- JMapViewer.jar

and Simple.java looks like this

import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;

public class Simple {}

all you have to do, is to point to JMapViewer.jar while compiling the code

> javac -cp jar/JMapViewer.jar Simple.java

if you don't you will get an error

> javac Simple.java
Simple.java:1: error: package org.openstreetmap.gui.jmapviewer.interfaces does not exist
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;