Friday, September 25, 2026

Re: Temp gwt directory

If I set the tmp directory to just  <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>  then I don't need to get Maven to create it.  The target direcory is spammed with a mass of GWT files, but at least it works.

On Saturday, 26 September 2026 at 10:44:32 am UTC+10 Craig Mitchell wrote:
This bug was doing my head in:  https://github.com/gwtproject/gwt/issues/10329 (because I'm moving widgets in and out of GWT, and when I switch between my git branches, I hit it).

However, I figured out that GWT writes to the windows temp dir %temp%/gwt-cache-xxx/gwt-unitCache and if I delete that, the problem goes away.

I thought it was the tbroyer gwt-maven-plugin creating these temp files, but it wasn't, it's some internal GWT thing.

I managed to relocate the files in the tbroyer plugin configuration with:
<systemProperties>
  <java.io.tmpdir>${project.build.directory}/gwt-temp</java.io.tmpdir>
</systemProperties>

Now a simple mvn clean gets rid of them.  However, GWT won't create this directory automatically, so when you try to run after a clean, you get:

[WARNING] java.lang.ExceptionInInitializerError
[WARNING] at com.google.gwt.dev.javac.CompiledClass.<clinit>(CompiledClass.java:42)
[WARNING] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.createCompiledClass(JdtCompiler.java:352)
[WARNING] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:315)
[WARNING] at org.eclipse.jdt.internal.compiler.Compiler.processCompiledUnits(Compiler.java:575)
[WARNING] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:475)
[WARNING] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)
[WARNING] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1059)
[WARNING] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:314)
[WARNING] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:519)
[WARNING] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:453)
[WARNING] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:425)
[WARNING] at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:221)
[WARNING] at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:89)
[WARNING] at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.makeOutboxTable(CodeServer.java:194)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:153)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:106)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:57)
[WARNING] Caused by: java.lang.RuntimeException: Unable to initialize byte cache
[WARNING] at com.google.gwt.dev.util.DiskCache.<init>(DiskCache.java:78)
[WARNING] at com.google.gwt.dev.util.DiskCache.<clinit>(DiskCache.java:65)
[WARNING] ... 18 more
[WARNING] Caused by: java.io.IOException: The system cannot find the path specified
[WARNING] at java.base/java.io.WinNTFileSystem.createFileExclusively0(Native Method)
[WARNING] at java.base/java.io.WinNTFileSystem.createFileExclusively(WinNTFileSystem.java:542)
[WARNING] at java.base/java.io.File.createTempFile(File.java:1887)
[WARNING] at java.base/java.io.File.createTempFile(File.java:1928)
[WARNING] at com.google.gwt.dev.util.DiskCache.<init>(DiskCache.java:72)
[WARNING] ... 19 more

This can be fixed by getting maven to create the directory:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-antrun-plugin</artifactId>
  <version>3.2.0</version>

  <executions>
    <execution>
      <id>create-gwt-temp</id>
      <phase>initialize</phase>
      <configuration>
        <target>
          <mkdir dir="${project.build.directory}/gwt-temp"/>
        </target>
      </configuration>
      <goals>
        <goal>run</goal>
      </goals>
    </execution>
  </executions>
</plugin>

I feel like there is a better way to manage the GWT temp directory.  Does anyone have a better solution?  Thanks.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/57006d9f-0ccd-4026-b551-c96b5cd08e23n%40googlegroups.com.

Temp gwt directory

This bug was doing my head in:  https://github.com/gwtproject/gwt/issues/10329 (because I'm moving widgets in and out of GWT, and when I switch between my git branches, I hit it).

However, I figured out that GWT writes to the windows temp dir %temp%/gwt-cache-xxx/gwt-unitCache and if I delete that, the problem goes away.

I thought it was the tbroyer gwt-maven-plugin creating these temp files, but it wasn't, it's some internal GWT thing.

I managed to relocate the files in the tbroyer plugin configuration with:
<systemProperties>
  <java.io.tmpdir>${project.build.directory}/gwt-temp</java.io.tmpdir>
</systemProperties>

Now a simple mvn clean gets rid of them.  However, GWT won't create this directory automatically, so when you try to run after a clean, you get:

[WARNING] java.lang.ExceptionInInitializerError
[WARNING] at com.google.gwt.dev.javac.CompiledClass.<clinit>(CompiledClass.java:42)
[WARNING] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.createCompiledClass(JdtCompiler.java:352)
[WARNING] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:315)
[WARNING] at org.eclipse.jdt.internal.compiler.Compiler.processCompiledUnits(Compiler.java:575)
[WARNING] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:475)
[WARNING] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)
[WARNING] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1059)
[WARNING] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:314)
[WARNING] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:519)
[WARNING] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:453)
[WARNING] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:425)
[WARNING] at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:221)
[WARNING] at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:89)
[WARNING] at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.makeOutboxTable(CodeServer.java:194)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:153)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:106)
[WARNING] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:57)
[WARNING] Caused by: java.lang.RuntimeException: Unable to initialize byte cache
[WARNING] at com.google.gwt.dev.util.DiskCache.<init>(DiskCache.java:78)
[WARNING] at com.google.gwt.dev.util.DiskCache.<clinit>(DiskCache.java:65)
[WARNING] ... 18 more
[WARNING] Caused by: java.io.IOException: The system cannot find the path specified
[WARNING] at java.base/java.io.WinNTFileSystem.createFileExclusively0(Native Method)
[WARNING] at java.base/java.io.WinNTFileSystem.createFileExclusively(WinNTFileSystem.java:542)
[WARNING] at java.base/java.io.File.createTempFile(File.java:1887)
[WARNING] at java.base/java.io.File.createTempFile(File.java:1928)
[WARNING] at com.google.gwt.dev.util.DiskCache.<init>(DiskCache.java:72)
[WARNING] ... 19 more

This can be fixed by getting maven to create the directory:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-antrun-plugin</artifactId>
  <version>3.2.0</version>

  <executions>
    <execution>
      <id>create-gwt-temp</id>
      <phase>initialize</phase>
      <configuration>
        <target>
          <mkdir dir="${project.build.directory}/gwt-temp"/>
        </target>
      </configuration>
      <goals>
        <goal>run</goal>
      </goals>
    </execution>
  </executions>
</plugin>

I feel like there is a better way to manage the GWT temp directory.  Does anyone have a better solution?  Thanks.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/6b2ff6d6-7162-4c95-a2bc-53bb4c16c926n%40googlegroups.com.

Friday, September 4, 2026

Re: GWt TeaVM comparison

I compile to JavaScript, I guess if I was compiling to WASM I wouldn't have the source map problems, no WASM code for it to keep stepping into. Other than that, I think I read WASM is used a lot for things like offloading web scraping to distributed devices,  but presumably where there's very demanding processing it's  more efficient. I do a lot of D3 in TS, I presume WASM can bridge to that so it's worth considering 


On Fri, Sep 4, 2026 at 4:49 AM, Craig Mitchell
<mail@craig-mitchell.com> wrote:
I looked at GraalVM as a JVM replacement, but it wouldn't work with the libraries I use (Google Datastore mainly).  I didn't realise it could also be used to compile WebAssembly.  Thanks, will check it out!

Will also check out J2CL for Web Assembly.  Publish the plugin!  :-D

On Friday, 4 September 2026 at 1:36:53 pm UTC+10 Dmitrii Tikhomirov wrote:

You can use GraalVM to compile Java to WebAssembly.

 The main limitation is multithreading; almost everything else works. 

If you need a very small WASM binary, you can use J2CL. 

I’ve actually already added WASM support to the j2cl-maven-plugin, but I still haven’t gotten around to publishing it.


On Sep 3, 2026, at 8:31 PM, Craig Mitchell <ma...@craig-mitchell.com> wrote:

Do you use it to compile to JavaScript or WebAssembly?

I'd love to compile Java to WebAssembly, but I'm too nervous about the edge cases.

On Friday, 4 September 2026 at 7:43:09 am UTC+10 Tim Macpherson wrote:
Maybe interesting for some:
.
I'm using TeaVM. Main problem is source map debugging will  usually descend into transpiled js, GWT doesn't have that problem otherwise ok it it lasts.


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/9335d428-ddc6-4f79-b180-07f733051f05n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/87aaa65a-857e-410e-9f7a-03c9720ddbecn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/130306843.1321063.1788552339412%40mail.yahoo.com.

Thursday, September 3, 2026

Re: GWt TeaVM comparison

I looked at GraalVM as a JVM replacement, but it wouldn't work with the libraries I use (Google Datastore mainly).  I didn't realise it could also be used to compile WebAssembly.  Thanks, will check it out!

Will also check out J2CL for Web Assembly.  Publish the plugin!  :-D

On Friday, 4 September 2026 at 1:36:53 pm UTC+10 Dmitrii Tikhomirov wrote:

You can use GraalVM to compile Java to WebAssembly.

 The main limitation is multithreading; almost everything else works. 

If you need a very small WASM binary, you can use J2CL. 

I’ve actually already added WASM support to the j2cl-maven-plugin, but I still haven’t gotten around to publishing it.


On Sep 3, 2026, at 8:31 PM, Craig Mitchell <ma...@craig-mitchell.com> wrote:

Do you use it to compile to JavaScript or WebAssembly?

I'd love to compile Java to WebAssembly, but I'm too nervous about the edge cases.

On Friday, 4 September 2026 at 7:43:09 am UTC+10 Tim Macpherson wrote:
Maybe interesting for some:
.
I'm using TeaVM. Main problem is source map debugging will  usually descend into transpiled js, GWT doesn't have that problem otherwise ok it it lasts.


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/9335d428-ddc6-4f79-b180-07f733051f05n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/87aaa65a-857e-410e-9f7a-03c9720ddbecn%40googlegroups.com.

Re: GWt TeaVM comparison

You can use GraalVM to compile Java to WebAssembly.

 The main limitation is multithreading; almost everything else works. 

If you need a very small WASM binary, you can use J2CL. 

I’ve actually already added WASM support to the j2cl-maven-plugin, but I still haven’t gotten around to publishing it.


On Sep 3, 2026, at 8:31 PM, Craig Mitchell <mail@craig-mitchell.com> wrote:

Do you use it to compile to JavaScript or WebAssembly?

I'd love to compile Java to WebAssembly, but I'm too nervous about the edge cases.

On Friday, 4 September 2026 at 7:43:09 am UTC+10 Tim Macpherson wrote:
Maybe interesting for some:
.
I'm using TeaVM. Main problem is source map debugging will  usually descend into transpiled js, GWT doesn't have that problem otherwise ok it it lasts.


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/9335d428-ddc6-4f79-b180-07f733051f05n%40googlegroups.com.

Re: GWt TeaVM comparison

Do you use it to compile to JavaScript or WebAssembly?

I'd love to compile Java to WebAssembly, but I'm too nervous about the edge cases.

On Friday, 4 September 2026 at 7:43:09 am UTC+10 Tim Macpherson wrote:
Maybe interesting for some:
.
I'm using TeaVM. Main problem is source map debugging will  usually descend into transpiled js, GWT doesn't have that problem otherwise ok it it lasts.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/9335d428-ddc6-4f79-b180-07f733051f05n%40googlegroups.com.

GWt TeaVM comparison

Maybe interesting for some:
.
I'm using TeaVM. Main problem is source map debugging will  usually descend into transpiled js, GWT doesn't have that problem otherwise ok it it lasts.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/1665484800.928484.1788471699651%40mail.yahoo.com.