GithubHelp home page GithubHelp logo

jabrt's Introduction

abrt-java

ABRT API Java bindings

Compile the jar file with maven: mvn package

Unzip the jar archive created in the target/ folder to /usr/share/java

Use in your code:

import com.redhat.abrt.ProblemDataAbrt;
import com.redhat.abrt.ProblemDataServer;

public MyClass {

    public static void main(String[] args) {
        ProblemData pd = new ProblemDataAbrt();
        pd.add("BACKTRACE", "backtrace content");
        pd.add("TYPE", "java");
        pd.add("ANALYZER", "java");
        pd.add("PID", "12345");
        pd.add("EXECUTABLE", "/bin/eclipse");
        pd.add("REASON", "tesing java problem data");
        String filename = "/etc/hosts";
        try {
            pd.addFile(filename);
        } catch (FileNotFoundException e) {
            System.err.println("Can't add file: " + filename);
        }

        ProblemDataServer ps = new ProblemDataServer();
        try {
            send(pd);
        } catch (IOException e) {
            System.err.println("Can't send data to ABRT: " + e.getMessage());
        }
    }
}

jabrt's People

Contributors

mozeq avatar

Stargazers

Jan Ferko avatar

Watchers

James Cloos avatar  avatar Jakub Filak avatar

jabrt's Issues

Add an enum containing all supported keys

"BACKTRACE", "TYPE" etc. might be stored in an enum to avoid errors caused by typos etc. (contents of strings are not checked by IDE, but enum constants could be verified)

Direct request to ABRT

I was thinking about rewriting ProblemDataServer, so that it does not requires unix socket for sending ProblemData to ABRT server, but rather send http request directly to ABRT. This would allow usage of library in apps that don't run on other operating systems.

Is it possible or ABRT requires to send ProblemData through unix socket?

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.