Giter Club home page Giter Club logo

Comments (7)

ErrorxCode avatar ErrorxCode commented on July 21, 2024

Java version 17 or greater is required

from jxinsta.

animexxx avatar animexxx commented on July 21, 2024

I install java 22. Then it still error
`Exception in thread "main" java.lang.NoClassDefFoundError: com/errorxcode/jxinsta/endpoints/PublicAPIs


package dd.main;

import com.errorxcode.jxinsta.endpoints.PublicAPIs;
import com.errorxcode.jxinsta.endpoints.profile.Profile;
import kong.unirest.Unirest;

/**
 *
 * @author Joey
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Unirest.config().verifySsl(false).followRedirects(true);
        Profile profile;
        try {
            profile = PublicAPIs.getProfileInfo("x0.rahil");

            profile.posts.forEach(item -> {
                System.out.println(item.download_url);
            });
        } catch (Exception ex) {
            ex.printStackTrace();
        }

    }

}

pom.xml
<dependency> <groupId>com.errorxcode.jxinsta</groupId> <artifactId>jxinsta</artifactId> <version>v1.0-beta-2</version> <scope>system</scope> <systemPath>D:/Work/java/igScanV3/JxInsta-v1.0-beta-2.jar</systemPath> </dependency>

from jxinsta.

ErrorxCode avatar ErrorxCode commented on July 21, 2024

are other classes working? Like the main JxInsta class, or does every class of the library is throwing the same error?

from jxinsta.

animexxx avatar animexxx commented on July 21, 2024

Exception in thread "main" java.lang.NoClassDefFoundError: com/errorxcode/jxinsta/JxInsta

Any in the libs throw error

from jxinsta.

ErrorxCode avatar ErrorxCode commented on July 21, 2024

That means your library is not properly included in your project. Put your jar file in libs folder of your java project and then set that path like this,
<systemPath>${project.basedir}/lib/JxInsta-v1.0-beta-2.jar</systemPath>

from jxinsta.

animexxx avatar animexxx commented on July 21, 2024

already copy to lib and libs folder to project path friend

from jxinsta.

ErrorxCode avatar ErrorxCode commented on July 21, 2024

I tried to add libs like this:

<dependency>
            <groupId>com.errorxcode.jxinsta</groupId>
            <artifactId>jxinsta</artifactId>
            <version>v1.0-beta-2</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/JxInsta-v1.0-beta-2.jar</systemPath>
</dependency>

im using netbeans and java 1.8, but it always return error cannot access PublicAPIs when run the project. Look like it not work with local dependency , please help

updated: when i try with Ant and add the Jar file Exception in thread "main" java.lang.UnsupportedClassVersionError: com/errorxcode/jxinsta/endpoints/PublicAPIs has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Just the way you did this, do it again with the latest Java (or 16+) version and you will not get UnsupportedClassVersionError

from jxinsta.

Related Issues (10)

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.