Git Product home page Git Product logo

mysticlight4j's People

Contributors

dependabot[bot] avatar fischmat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

teodor-radoi

mysticlight4j's Issues

NoSuchMethodError

Hey,
i wasnt quite able to make this project runable.

Neither implementation example of your readme seem to work for me.

Here's my Class:

package com.nearix.test;

import java.util.Collection;
import java.util.List;

import de.matthiasfisch.mysticlight4j.Device;
import de.matthiasfisch.mysticlight4j.LED;
import de.matthiasfisch.mysticlight4j.MysticLight4j;
import de.matthiasfisch.mysticlight4j.api.DeviceInfo;
import de.matthiasfisch.mysticlight4j.api.LedInfo;
import de.matthiasfisch.mysticlight4j.api.MysticLightAPI;

public class Main {
public static void main(String[] args) {
MysticLight4j mysticLight = new MysticLight4j();
Collection devices = mysticLight.getAllAvailableDevices();
for (Device device : devices) {
String id = device.getIdentifier(); // Unique ID of the device
String name = device.getName(); // Display name of the device
System.out.println(name);
List leds = device.getLEDs(); // The LED groups on the device
}

// Console:
// C:\Users\NeariX\OneDrive - OSZ IMT\Coding\Eclipse\WorkSpace\MSI Mystic Light Java
// Exception in thread "main" java.lang.NoSuchMethodError:
// at de.matthiasfisch.mysticlight4j.api.MysticLightNativeBinding.getLedInfo(Native Method)
// at de.matthiasfisch.mysticlight4j.api.MysticLightAPI.getLedInfo(MysticLightAPI.java:151)
// at de.matthiasfisch.mysticlight4j.LED.(LED.java:33)
// at de.matthiasfisch.mysticlight4j.Device.lambda$0(Device.java:29)
// at java.util.stream.IntPipeline$4$1.accept(IntPipeline.java:250)
// at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)
// at java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:693)
// at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
// at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
// at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
// at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
// at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
// at de.matthiasfisch.mysticlight4j.Device.(Device.java:30)
// at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
// at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
// at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
// at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
// at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
// at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
// at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
// at de.matthiasfisch.mysticlight4j.MysticLight4j.getAllAvailableDevices(MysticLight4j.java:64)
// at com.nearix.test.Main.main(Main.java:13)

	MysticLightAPI.initialize();  
	DeviceInfo[] devices = MysticLightAPI.getDeviceInfo();  
	for (DeviceInfo device : devices) {  
	    // Prints the unique identifier of the device  
	  System.out.println(device.getDeviceType());  
	  System.out.println("LED groups for this device:");  
	 for (int i = 0; i < device.getLedCount(); i++) {  
	        LedInfo led = MysticLightAPI.getLedInfo(device.getDeviceType(), i);  
	  System.out.println(led.getName());  
	  }  
	}

// Console:
// MSI_MB
// LED groups for this device:
// Exception in thread "main" java.lang.NoSuchMethodError:
// at de.matthiasfisch.mysticlight4j.api.MysticLightNativeBinding.getLedInfo(Native Method)
// at de.matthiasfisch.mysticlight4j.api.MysticLightAPI.getLedInfo(MysticLightAPI.java:151)
// at com.nearix.test.Main.main(Main.java:25)

}

}

It doesn't seem to find the getLedInfo Method.

"MSI Application not found or version not supported"

I was giving this project my first try and tried to use your example given in your readme to fetch my devices, but with both the object oriented and low-level api the error:

Exception in thread "main" de.matthiasfisch.mysticlight4j.api.MysticLightAPIException: MSI Application not found or installed version not supported.
at de.matthiasfisch.mysticlight4j.api.MysticLightNativeBinding.initialize(Native Method)
at de.matthiasfisch.mysticlight4j.api.MysticLightAPI.initialize(MysticLightAPI.java:80)
at de.matthiasfisch.mysticlight4j.api.MysticLightAPI.initialize(MysticLightAPI.java:60)
at de.matthiasfisch.mysticlight4j.MysticLight4j.(MysticLight4j.java:54)
at de.matthiasfisch.mysticlight4j.MysticLight4j.(MysticLight4j.java:32)

occured while initializing the msi api. my mystic light sdk is present so i assume it may have something to do with the version? i would appreciate your help and if you need any logs or something i can of course send them to you.
thank you in advance.

A fatal error has been detected by the Java Runtime Environment:

Getting the below error after setting up the environment running the below code:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=4244, tid=23540
#
# JRE version: Java(TM) SE Runtime Environment (16.0.1+9) (build 16.0.1+9-24)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0.1+9-24, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  0x0000000000000000
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\...\MysticLightTest\hs_err_pid4244.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
import de.matthiasfisch.mysticlight4j.api.MysticLightAPI;

import java.nio.file.Path;

public class driver {

    public static void main(String[] args){
        MysticLightAPI.initialize(Path.of("MysticLightSDK"));
    }

}

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.