repeats / Repeat

Cross-platform mouse/keyboard record/replay and automation hotkeys/macros creation, and more advanced automation features.
Apache License 2.0
1.03k stars 76 forks source link

Doesn't boot #40

Closed 32bitx64bit closed 1 year ago

32bitx64bit commented 1 year ago

Feb 02, 2023 6:18:39 PM frontEnd.MainBackEndHolder WARNING: System tray is not supported! Feb 02, 2023 6:18:39 PM core.controller.Core local SEVERE: Exception constructing controller java.awt.AWTException: headless environment at java.desktop/java.awt.Robot.checkHeadless(Robot.java:179) at java.desktop/java.awt.Robot.(Robot.java:96) at core.controller.Core.local(Core.java:27) at core.controller.CoreProvider.getLocal(CoreProvider.java:30) at core.recorder.Recorder.(Recorder.java:43) at frontEnd.MainBackEndHolder.(MainBackEndHolder.java:122) at frontEnd.MainFrontEnd.run(MainFrontEnd.java:32) at main.Main.main(Main.java:11)

32bitx64bit commented 1 year ago

To clarify im on Ubuntu budgie 22.04.1 64bit on X11

hptruong93 commented 1 year ago

java.awt.AWTException: headless environment

Could you provide more details on the setup? Are you trying to launch this from a different machine connected to the Ubuntu machine? In general, you can't run this via headless environment. X11/ssh doesn't provide access to the remote machine's mouse/keyboard. There's a specific section in FAQ about headless https://github.com/repeats/Repeat#why-is-this-only-available-in-non-headless-system

32bitx64bit commented 1 year ago

Im not using SSH to run, im on native hardware

Maybe a issue with compatibility on Budgie?

hptruong93 commented 1 year ago

Let me download a fresh Ubuntu Budgie and try.

Meanwhile, if possible, can you try compiling and running the following simple Java program?

import java.awt.AWTException;
import java.awt.Robot;

public class Test {

    public static void main(String[] args) throws AWTException  {
        Robot robot = new Robot();
        robot.delay(1000);
        System.out.println("test");
    }
}

Basically write the content into Test.java, then run $javac Test.java (you may need to set the classpath after compilation to point to add the current directory) $java Test

Testing in an IDE is also fine. I just want to see whether java.awt.Robot can be created.

hptruong93 commented 1 year ago

My internet was slow so I couldn't test for the past few days.

I just downloaded an tried running on a fresh installation of Ubuntu Budgie with "default-jdk" (sudo apt install default-jdk) and it works fine.

How did you boot the JAR file? Did you use java -jar Repeat.jar? Can you share the output of java -version too?

32bitx64bit commented 1 year ago

I launched via the instructions. I'll try giving defualt jdk a try.

32bitx64bit commented 1 year ago

Been busy but using default JDK worked