Ошибка при экспорте в processing
Сделал простенькую подсветку под стол работающую на переключение реле с логикой на arduino и также приложение для работы с ней через пк.
Сделал простенькую подсветку под стол работающую на переключение реле с логикой на arduino и также приложение для работы с ней через пк.
import processing.serial.*;
import controlP5.*;
import java.util.*;
Serial s;
ControlP5 cp5;
int speed= 9600;
String port = "";
int lcolor = 0;
void setup(){
cp5 = new ControlP5(this);
size(350, 300);
cp5.addScrollableList("Ports").setBarHeight(15).close();
cp5.addButton("Refresh").linebreak();
cp5.addButton("Open").linebreak();
cp5.addButton("Close").linebreak();
cp5.addButton("Red");
cp5.addButton("Green");
cp5.addButton("Blue").linebreak();
cp5.addButton("Sent").linebreak().setPosition(250,200);
cp5.addButton("SetColor").setPosition(90, 150);
cp5.addScrollableList("Ports").setBarHeight(15).close();
}
void Refresh(){
String ports[] = s.list();
cp5.get(ScrollableList.class, "Ports").setItems(ports);
}
void Ports(int n){
port = s.list()[n];
}
void Open(){
s = new Serial(this, port, speed);
}
void Close(){
s.stop();
}
void Sent(){
s.write(str(lcolor));
lcolor = 0;
}
void Red(int c){
lcolor = 3*100 + lcolor % 100;
}
void Green(){
lcolor = (int)Math.floor(lcolor/100)*100 + 2*10 + lcolor % 10;
}
void Blue(){
lcolor = (int)Math.floor(lcolor/10)*10 + 4;
}
void SetColor(){
lcolor = 0;
}
void draw(){
background(255,255,255);
println(lcolor);
rect(50, 200, 50, 50);
fill((int)(Math.floor(lcolor/100)/3) * 255, (int)(((lcolor%100)/10)/2)*255, (int)(lcolor%10/4)*255);
}
Хочу экспротировать в .exe-шник чтобы не совершать лишних кликов мышкой, а просто открывать приложение и уже с ним работать. При экспорте выдаёт следующую ошибку:
C:\Users\Сергей\Desktop\lchange\windows-amd64\launch4j-build.xml
Compiling resources
Џ®ЇлвЄ § ЇЁбЁ ў ҐбгйҐбвўгойЁ© Є «.
C:\Users\Сергей\Desktop\processing-4.0b7\modes\java\application\launch4j\bin\windres.exe: can't open icon file `C:\Users\??????\Desktop\processing-4.0b7\modes\java\application\application.ico': Invalid argument
C:\Users\Сергей\Desktop\processing-4.0b7\modes\java\application\launch4j\bin\windres.exe: preprocessing failed.
Generated resource file...
LANGUAGE 0, 1
1 RCDATA BEGIN "java\0" END
2 RCDATA BEGIN "17\0" END
18 RCDATA BEGIN "1\0" END
30 RCDATA BEGIN "2\0" END
12 RCDATA BEGIN "-Djna.nosys=true -Djava.library.path=""%EXEDIR%\\lib""\0" END
1 ICON DISCARDABLE "C:\\Users\\Сергей\\Desktop\\processing-4.0b7\\modes\\java\\application\\application.ico"
21 RCDATA BEGIN "https://adoptium.net/\0" END
20 RCDATA BEGIN "32\0" END
101 RCDATA BEGIN "An error occurred while starting the application.\0" END
102 RCDATA BEGIN "This application requires a Java Runtime Environment.\0" END
103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END
15 RCDATA BEGIN "lchange\0" END
16 RCDATA BEGIN "lib\\lchange.jar;lib\\core.jar;lib\\gluegen-rt.jar;lib\\jogl-all.jar;lib\\jssc.jar;lib\\serial.jar;lib\\controlP5.jar\0" END
windows:
BUILD FAILED
C:\Users\Сергей\Desktop\lchange\windows-amd64\launch4j-build.xml:5: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\Users\Сергей\Desktop\processing-4.0b7\modes\java\application\launch4j\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\D899~1\AppData\Local\Temp\launch4j4160228841619495950rc C:\Users\D899~1\AppData\Local\Temp\launch4j11398770050881743077o
at net.sf.launch4j.Builder.build(Builder.java:149)
at net.sf.launch4j.ant.Launch4jTask.execute(Launch4jTask.java:111)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
at processing.mode.java.JavaBuild.buildWindowsLauncher(JavaBuild.java:1136)
at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:979)
at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:590)
at processing.mode.java.JavaMode.handleExportApplication(JavaMode.java:183)
at processing.mode.java.ExportPrompt.trigger(ExportPrompt.java:495)
at processing.mode.java.ExportPrompt.trigger(ExportPrompt.java:157)
at processing.mode.java.JavaEditor.handleExportApplication(JavaEditor.java:516)
at processing.mode.java.JavaEditor.lambda$buildFileMenu$0(JavaEditor.java:239)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
at java.desktop/java.awt.Component.processEvent(Component.java:6391)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: net.sf.launch4j.ExecException: Exec failed (1): C:\Users\Сергей\Desktop\processing-4.0b7\modes\java\application\launch4j\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\D899~1\AppData\Local\Temp\launch4j4160228841619495950rc C:\Users\D899~1\AppData\Local\Temp\launch4j11398770050881743077o
at net.sf.launch4j.Util.exec(Util.java:156)
at net.sf.launch4j.Cmd.exec(Builder.java:215)
at net.sf.launch4j.Builder.build(Builder.java:100)
... 57 more
Total time: 0 seconds
Что делать, как фиксить?
Пробовал установить новую версию java и перемещать скетч в основную папку processing-а т.к. с основного форума этой среды увидел, что у одного товарища не работал экспорт по этой причине, но в моём случае эффекта не дало.