Trying 0.51 and 0.81 both fail

10 views
Skip to first unread message

Paul Szudzik

unread,
Oct 19, 2025, 1:36:08 PMOct 19
to bck2brwsr
When I try 0.51 in my app... it always fails after all js is created if I use the show.  If I do not put the show in when using maven, the files are created, but no html files.

When I tried 0.81, well... it always failed.  I szaw a dependency and inserted that into my chain, but that didn't work very well.  

I would like to use this, but ... I need some help.  Both of these projects are quite large
 
// from mvn run with -X

[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG] Configuring mojo org.apidesign.bck2brwsr:bck2brwsr-maven-plugin:0.81:aot from plugin realm ClassRealm[plugin>org.apidesign.bck2brwsr:bck2brwsr-maven-plugin:0.81, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@73d16e93]
[DEBUG] Configuring mojo 'org.apidesign.bck2brwsr:bck2brwsr-maven-plugin:0.81:aot' with basic configurator -->
[DEBUG]   (f) classPathPrefix = lib
[DEBUG]   (f) generateAotLibraries = true
[DEBUG]   (f) ignoreBootClassPath = true
[DEBUG]   (f) localRepository =       id: local
      url: file:///e:/MavenBinaries/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]
   blocked: false

[DEBUG]   (f) mainJar = E:\MavenSources\SimpleGcodeViewer\target\SimpleGcodeViewer-1.0-SNAPSHOT.jar
[DEBUG]   (f) mainJavaScript = E:\MavenSources\SimpleGcodeViewer\target\SimpleGcodeViewer-1.0-SNAPSHOT.js
[DEBUG]   (f) obfuscation = NONE
[DEBUG]   (f) prj = MavenProject: com.throwarock:SimpleGcodeViewer:1.0-SNAPSHOT @ E:\MavenSources\SimpleGcodeViewer\pom.xml
[DEBUG]   (f) vm = E:\MavenSources\SimpleGcodeViewer\target\bck2brwsr.js
[DEBUG] -- end configuration --
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-controls-17.0.16.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-controls-17.0.16-win.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-graphics-17.0.16.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-graphics-17.0.16-win.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-base-17.0.16.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-base-17.0.16-win.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-fxml-17.0.16.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\javafx-fxml-17.0.16-win.js
[INFO] Generating E:\MavenSources\SimpleGcodeViewer\target\lib\bck2brwsr-maven-plugin-0.81.js
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:43 min
[INFO] Finished at: 2025-10-19T10:28:01-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apidesign.bck2brwsr:bck2brwsr-maven-plugin:0.81:aot (default-cli) on project SimpleGcodeViewer: Can't compile e:\MavenBinaries\repository\org\apidesign\bck2brwsr\bck2brwsr-maven-plugin\0.81\bck2brwsr-maven-plugin-0.81.jar: Error while compiling com/google/javascript/jscomp/jarjar/org/apache/tools/ant/types/resources/URLResource
[ERROR] java.lang.ArrayIndexOutOfBoundsException: Index 28 out of bounds for length 16
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apidesign.bck2brwsr:bck2brwsr-maven-plugin:0.81:aot (default-cli) on project SimpleGcodeViewer: Can't compile e:\MavenBinaries\repository\org\apidesign\bck2brwsr\bck2brwsr-maven-plugin\0.81\bck2brwsr-maven-plugin-0.81.jar
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:578)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: Can't compile e:\MavenBinaries\repository\org\apidesign\bck2brwsr\bck2brwsr-maven-plugin\0.81\bck2brwsr-maven-plugin-0.81.jar
    at org.apidesign.bck2brwsr.mojo.AheadOfTime$1Work.failure (AheadOfTime.java:205)
    at org.apidesign.bck2brwsr.mojo.AheadOfTimeBase.raise (AheadOfTimeBase.java:210)
    at org.apidesign.bck2brwsr.mojo.AheadOfTimeBase.work (AheadOfTimeBase.java:92)
    at org.apidesign.bck2brwsr.mojo.AheadOfTime.execute (AheadOfTime.java:244)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:578)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.io.IOException: Error while compiling com/google/javascript/jscomp/jarjar/org/apache/tools/ant/types/resources/URLResource
java.lang.ArrayIndexOutOfBoundsException: Index 28 out of bounds for length 16
    at org.apidesign.vm4brwsr.VM.generateBody (VM.java:243)
    at org.apidesign.vm4brwsr.VM.doCompile (VM.java:110)
    at org.apidesign.vm4brwsr.VM.compile (VM.java:100)
    at org.apidesign.vm4brwsr.Bck2Brwsr.generate (Bck2Brwsr.java:344)
    at org.apidesign.bck2brwsr.mojo.AheadOfTimeBase.aotLibrary (AheadOfTimeBase.java:193)
    at org.apidesign.bck2brwsr.mojo.AheadOfTimeBase.work (AheadOfTimeBase.java:90)
    at org.apidesign.bck2brwsr.mojo.AheadOfTime.execute (AheadOfTime.java:244)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:578)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 28 out of bounds for length 16
    at org.apidesign.vm4brwsr.ByteCodeParser$TypeArray.get (ByteCodeParser.java:2720)
    at org.apidesign.vm4brwsr.LocalsMapper.getT (LocalsMapper.java:123)
    at org.apidesign.vm4brwsr.LocalsMapper.getI (LocalsMapper.java:103)
    at org.apidesign.vm4brwsr.LoopCode.loopCode (LoopCode.java:175)
    at org.apidesign.vm4brwsr.ByteCodeToJavaScript.generateMethod (ByteCodeToJavaScript.java:565)
    at org.apidesign.vm4brwsr.ByteCodeToJavaScript.generateInstanceMethod (ByteCodeToJavaScript.java:493)
    at org.apidesign.vm4brwsr.ByteCodeToJavaScript.compileImpl (ByteCodeToJavaScript.java:260)
    at org.apidesign.vm4brwsr.ByteCodeToJavaScript.compile (ByteCodeToJavaScript.java:158)
    at org.apidesign.vm4brwsr.VM.generateClass (VM.java:183)
    at org.apidesign.vm4brwsr.VM$Extension.generateClass (VM.java:948)
    at org.apidesign.vm4brwsr.VM.generateBody (VM.java:239)
    at org.apidesign.vm4brwsr.VM.doCompile (VM.java:110)
    at org.apidesign.vm4brwsr.VM.compile (VM.java:100)
    at org.apidesign.vm4brwsr.Bck2Brwsr.generate (Bck2Brwsr.java:344)
    at org.apidesign.bck2brwsr.mojo.AheadOfTimeBase.aotLibrary (AheadOfTimeBase.java:193)
    at org.apidesign.bck2brwsr.mojo.AheadOfTimeBase.work (AheadOfTimeBase.java:90)
    at org.apidesign.bck2brwsr.mojo.AheadOfTime.execute (AheadOfTime.java:244)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:578)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
pom.xml

Jaroslav Tulach

unread,
Oct 20, 2025, 12:49:22 AMOct 20
to bck2brwsr, Paul Szudzik
Hello Paul,
thanks a lot for giving Bck2Brwsr a try! I'd be pleased we could get it
running for you!

> Can't compile
> e:\MavenBinaries\repository\org\apidesign\bck2brwsr\bck2brwsr-maven-
plugin\0.81\bck2brwsr-maven-plugin-0.81.jar

The problem is that you are putting some Maven plugins on your application
**classpath**. That's not going to work.

Bck2Brwsr VM emulation only covers basic Java APIs - it certainly cannot
invoke Maven with its disk access (there is no real disk in browser, right?),
networking (there are no sockets in browsers, right?) and execution (one
cannot execute .exe in the browser, right?).

Maven plugins belong into <plugin> section, not <dependency> section. Remove
this:
```
<dependency>
<groupId>org.apidesign.bck2brwsr</groupId>
<artifactId>bck2brwsr-maven-plugin</artifactId>
<version>0.81</version>
</dependency>
```

Why don't you start from a working archetype? I know these archetypes have
been updated recently to work with JDK21: https://dukescript.com/update/
2025/06/27/archetypes-update.html - use them to get skeleton of your
application running. Then modify it to do what you want...

Best regards and thanks for giving Bck2Brwsr a chance!
-jt

PS: What kind of goal do you want to achieve?

Dne neděle 19. října 2025 19:36:08, středoevropský letní čas, Paul Szudzik
napsal(a):
> Resource [ERROR] java.lang.ArrayIndexOutOfBoundsException: Index 28 out of
> Resource java.lang.ArrayIndexOutOfBoundsException: Index 28 out of bounds

Paul Szudzik

unread,
Oct 20, 2025, 12:33:15 PMOct 20
to bck2brwsr
Yes, I shall give that a whirl.  I had tried GraalVM, which worked for me in Windows.. but I was stymied in MacOS, especially since I was running Monterey variant.  I saw that perhaps I could kill a few birds with one stone and get bck2brwsr to do some of the heavy lifting without me doing much work... but that looks like a separate amount of work, significant, to make this work.  My app I want to convert has three main screens:

mill1.png

mill2.png
travis2.png

Jaroslav Tulach

unread,
Oct 24, 2025, 10:45:43 AM (12 days ago) Oct 24
to bck2brwsr, Paul Szudzik, toni....@eppleton.de
Hello Paul,
when I look at your screenshots, I believe they "cry" for a browser based UI.

However I don't have time to properly understand your use-case and analyze
what's the best way to move forward. If you want such an advice, I'd like to
introduce Toni Epple to you. Toni is the inventor of the DukeScript brand and
DukeScript takes bck2brwsr to another level!

I am pretty sure that Toni is able to solve any issues you have. Be it
Bck2Brwsr or overall structure of your application. Toni, do you want to chime
in?

-jt

Dne pondělí 20. října 2025 18:33:14, středoevropský letní čas, Paul Szudzik

Paul Szudzik

unread,
Oct 24, 2025, 2:35:01 PM (12 days ago) Oct 24
to bck2brwsr
Thank you for your response.  I have been programming in lower level languages ( Asm, then C) since 1967.  Then I moved to Basic, C++ and Java.  I design tools for CNC and Laser work.  The use case has always been windows driven until recently, where a lot of customers have opted for Mac as a machine.  Unfortunately, porting Java to Mac, is very close, but there are enough "Gotchas" that I couldn't do it in time.  Therre is a lot of translation code under the covers.

I had thought that I could be more universal by converting my JavaFX code to Html, browser based.  ButI had invested so much time in the work, that I was looking for a quick and dirty way to get it done.  Obviously, that isn't going to happen, and me being 77 years old now, I am not interested in rewriting everything. I could just use Jakarta to handle my current lower level Java code, and then I only need to build a UI to handle the input fields.

This app, in summary, converts tool files from vendors to something the MillMage ( a cnc program ) can handle.  It then allows the user to add or delete tools that they need, and changes the parameters based on the users machine speeds and feeds.

I have tried the DukeScript.. and albeit, it does somewhat work, it falls short of what I needed.

Thanks for your time and repsonse, much appreciated.
Reply all
Reply to author
Forward
0 new messages