NetBeans Erstellen der Jar schlägt fehl

JAMarlonVA

Mitglied
Hallo an alle,

ich habe ein simples Projekt erstellt, welches mir einein Ini-Wert in die Konsole schreibt...
Funktioniert super beim testen allerdings kann ich keine Jar erstellen.

Kompletter Code:

Code:
import org.ini4j.Ini;

import java.nio.file.Paths;
import java.io.*;
import java.nio.file.Files;

public class getValue
{
    public static final String FILENAME = "xxx";

    public static void main(String[] args) throws Exception
    {       
        byte[] data = Files.readAllBytes(Paths.get(FILENAME));
        String contents = new String(data).replaceAll("\\\\", "/");
        InputStream stream = new ByteArrayInputStream(contents.getBytes());
       
       

        Ini ini = new Ini();
        ini.load(stream);
       
        for (String key : ini.get("Dirs").keySet())
        {
            if(key.equals("ClientDir"))
            System.out.println(ini.get("Dirs").fetch(key));
        }
    }
}

Fehler:
error: cannot find symbol
for (String key : ini.get("Dirs").keySet())
symbol: method keySet()
location: class Object

error: cannot find symbol
System.out.println(ini.get("Dirs").fetch(key));
symbol: method fetch(String)
location: class Object
2 errors

Danke schonmal!
 

Neue Themen


Zurück
Oben