Giter Site home page Giter Site logo

libartnet's People

Contributors

firionus avatar schw4rzlicht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

libartnet's Issues

Add doctests

Is your feature request related to a problem? Please describe.
#1 fixed an example in README that didn't compile due to a recent commit.

Describe the solution you'd like
All examples should be doctests.

Describe alternatives you've considered
None.

Additional context
I'm totally new to Java and have no idea yet how to do doctests.

Sender example can't find OemCodes.json

Describe the bug
Sender example from README.md throws ExceptionInInitializerError.

To Reproduce

  • gradle init a standard application.
  • Add implementation 'de.deltaeight:LibArtNet:1.1-beta' to the dependencies in build.gradle.
  • Run Sender example from README.md
  • Get back Exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
        at de.deltaeight.libartnet.builders.ArtPollReplyBuilder.<init>(ArtPollReplyBuilder.java:107)
        at firstVSCode.App.main(App.java:16)
Caused by: java.nio.file.FileSystemNotFoundException
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:156)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:142)
        at java.base/java.nio.file.Path.of(Path.java:208)
        at java.base/java.nio.file.Paths.get(Paths.java:98)
        at de.deltaeight.libartnet.descriptors.OemCode.<clinit>(OemCode.java:57)
        ... 2 more

Expected behavior
Don't throw an exception.

Code examples

/*
 * This Java source file was generated by the Gradle 'init' task.
 */
package firstVSCode;

import java.net.InetAddress;
import java.net.SocketException;
import java.net.UnknownHostException;

import de.deltaeight.libartnet.builders.ArtPollReplyBuilder;
import de.deltaeight.libartnet.descriptors.OemCode;
import de.deltaeight.libartnet.network.ArtNetSender;

public class App {
    public static void main(String[] args) throws SocketException, UnknownHostException {
        ArtPollReplyBuilder builder = new ArtPollReplyBuilder()
                // report as Robert Juliat Dalis Reference : 860
                .withProduct(OemCode.getProductByOemCode("OemRobertJulDalis1")).withBindIp(new byte[] { 127, 0, 0, 1 });

        ArtNetSender sender = new ArtNetSender();
        sender.start();

        sender.send(InetAddress.getByName("127.0.0.1"), builder.build());

        // Do other stuff

        sender.stop();
    }
}

System:

  • OS: Windows 10 Pro 1903, Build 18362.900
  • JDK/JRE Version
>java --version
openjdk 14.0.1 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.1+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14.0.1+7, mixed mode, sharing)
  • Library version: 1.1-beta

Additional context
jar-builds need a ZIP File System. ZipFileSystemProvider apparently cannot be created automatically.

Googling for FileSystemNotFoundException bring up lots of relevant results, but I can't make anything of it yet - I'm still new to Java.

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.