GithubHelp home page GithubHelp logo

Comments (5)

user12043 avatar user12043 commented on May 18, 2024 1

Hi,
The existence of "settings.json" file should not be a problem. I tried to download the code and open the project with my IDE (with Intellij IDEA) but there was no problem. Why it is not possible to open the project without the settings file? (Intellij idea is recognizing the maven project with pom.xml file.)

I downloaded zip file contains the executables and executed the program successfully. So could give more information about your error? I compressed and extracted the executables with 7-zip on windows and opened with "Ark" on linux also.

Thanks for your interest

from jpomotimer.

vincenzopalazzo avatar vincenzopalazzo commented on May 18, 2024

Hello @user12043 ,
sorry I'm bad, I'll post my mistakes that I found.
screenshot from 2018-11-07 23-10-53

screenshot from 2018-11-07 23-18-59

Also it would not be easier to post executables directly without zipping them?

from jpomotimer.

user12043 avatar user12043 commented on May 18, 2024

Hello @vincenzopalazzo
Now I understand the problem about JSONException In below function from ogr.user12043.jpomotimer.Utils

public static void loadSettings() {
        try {
            String fileContent = readSettingsFile();
            JSONObject jsonObject = new JSONObject(fileContent);
            // Some code here...
        } catch (IOException | JSONException e) {
            System.err.println("Failed to read settings file. Using default settings.");
            e.printStackTrace();
        }
}

The readSettingsFile() function returns an empty string if the file does not exists. Then fileContent becomes "". Because of this, new JSONObject(fileContent) throws JSONException and this exception is catching by catch block. So this exception is not blocking the program. Just printing the error with the line e.printStackTrace(). So the problem is not actually a problem. But I think the program should not print the exception to stdout and I edited the code and committed now.

And about the error when you trying the unzip the binaries, the archive created with 7-zip on windows, I am using Linux as you and I am getting the same error An error occurred when extracting files on some .zip files. But I successfully extracted my executables without this error. I haven't any solution about the error. So I uploaded the tar.gz archive of the binaries of my project. This should help you.

from jpomotimer.

vincenzopalazzo avatar vincenzopalazzo commented on May 18, 2024

Hello @user12043 ,

Sorry for the delay, I made a bit of confusion, sorry having seen the code I understand how it works.

Thanks for uploading the tar file this solved my problem

from jpomotimer.

user12043 avatar user12043 commented on May 18, 2024

I appreciated, thank you for your interest. Closing the issue

from jpomotimer.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.