Code Monkey home page Code Monkey logo

Comments (16)

verhas avatar verhas commented on July 24, 2024

It is not outdated in the sense that it can be used. Just be prepared that the license handling and license format is totally different in later versions. Whenever you migrate to Java 11 and the new version of License3j you will have to replace all the issued license files and rewrite the license handling API. You can also use the old version of License3j and Java 9 or later. This is also a possibility. It is up to you.

The fact that there is a newer version does not make the old version any worse. It is just as good as it was before.

from license3j.

verhas avatar verhas commented on July 24, 2024

Btw. License3j 2.0.0 also requires Java 10 as a minimum.

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

Ok, I should be on the License3j 1.0.8 version.
Is there a major difference between 1.0.8 and 2.0.0 version?

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

I tried the 2.0.0, it didn't tell me any problems

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

I want to run it on linux, the license3j.bat file is for window right? So is here any other way?

from license3j.

verhas avatar verhas commented on July 24, 2024

You can try to use license3j.sh. That may work under Linux.

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

license3j.bat encode --license-file=license-plain.
txt --keyring-file="c:\Documents and Settings\verhas\Application Data\gnupg\secr
ing.gpg" --key=GrooWikiDemoKey --password=******** --output=license.out

this is the command you ask us to do for generate the license file with window, I don't think license3j.sh do the same as license3j.bat do for linux

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

Or maybe shoud I use windows to generate license file and linux for the validation of the license file?

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

"This time you have to start the command line processor included in the license3j JAR file."
When you said this just before telling us to do the license3j.bat encode:

  • what is the command line processor?
  • And where can we find the license3j JAR file? (tried mvn package but didn t work)

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

I'm trying to figure out the java command you are generating with the .bat file but I can't figure out what whose are related to :

  • %CLASSPATH%
  • %ARGS1%,
  • %APP_CMD_LINE_ARGS% (all the args behing license3j.bat encode? )
  • %ARGS2%

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

You were right, it seem, I can't use java 8 for License3j 2.0.0 to generate license.
May I ask you to upload the version 1.0.8 of License3j?

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

"java -cp target/license3j-2.0.0-JVM8.jar com.javax0.license3j.License3j encode --license-file=license-plain.txt --keyring-file=secring.gpg --key=licensetest --password=password --output=license.out"

I get this after the command above, what is the meaning of this error? I have org.bouncycastle version 1.57 in your pom.xml as dependency from your 2.0.0 release git:

Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/openpgp/PGPException
at com.javax0.license3j.License3j.encode(License3j.java:97)
at com.javax0.license3j.License3j.main(License3j.java:86)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.openpgp.PGPException
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

from license3j.

verhas avatar verhas commented on July 24, 2024

You can download all the published versions from

https://mvnrepository.com/artifact/com.verhas/license3j

from license3j.

verhas avatar verhas commented on July 24, 2024

The License3j version 2.0.0 has a dependency on the BouncyCastle library, as you can see in the POM file. This library needs to be there on the classpath when the application runs and not only during compile time.

Your command line has only the license3j JAR file on the classpath.

from license3j.

ElemenT5ven avatar ElemenT5ven commented on July 24, 2024

I tried this one alse, but still I get the same error:

java -cp target/license3j-2.0.0-JVM8.jar:/home/ivan/.m2/repository/org/bouncycastle/bcpg-jdk15on/1.57/bcpg-jdk15on-1.57-sources.jar:/home/ivan/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.57/bcprov-jdk15on-1.57-sources.jar:/home/ivan/.m2/repository/org/mockito/mockito-all/1.10.17/mockito-all-1.10.17-sources.jar:/home/ivan/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.2.0/junit-jupiter-api-5.2.0-sources.jar:/home/ivan/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0-sources.jar:/home/ivan/.m2/repository/org/opentest4j/opentest4j/1.1.0/opentest4j-1.1.0-sources.jar:/home/ivan/.m2/repository/org/junit/platform/junit-platform-commons/1.2.0/junit-platform-commons-1.2.0-sources.jar:/home/ivan/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.2.0/junit-jupiter-engine-5.2.0-sources.jar:/home/ivan/.m2/repository/org/junit/platform/junit-platform-engine/1.2.0/junit-platform-engine-1.2.0-sources.jar com.javax0.license3j.License3j encode --license-file=license-plain.txt --keyring-file=secring.gpg --key=licensetest --password=password --output=license.out

Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
at com.javax0.license3j.License3j.encode(License3j.java:97)
at com.javax0.license3j.License3j.main(License3j.java:86)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)

from license3j.

verhas avatar verhas commented on July 24, 2024

There is no surprise. You will get the same error again and again while you do not have the BouncyCastle library on the classpath. You have a lot of unused libraries on the classpath, but the BouncyCastle library is not on the classpath.

from license3j.

Related Issues (20)

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.