teavm icon indicating copy to clipboard operation
teavm copied to clipboard

runtime.js not found and flavour/widgets.css not found

Open sairaghavak opened this issue 6 years ago • 2 comments

I am experimenting with TeaVM and I like the idea of bytecode to js and in future js to wasm.

Initially I faced this issue fixed in my local it as suggested.

Here are the specific versions that I am using

<properties>
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 <java.version>1.8</java.version>
 <flavour.version>0.2.0-dev-52</flavour.version>
 <teavm.version>0.6.0-dev-736</teavm.version>
 <jackson.version>2.5.4</jackson.version>
</properties>

And plugins, maven-compiler-plugin version: 3.8.1 maven-war-plugin 3.2.2

It has successfully generated the js files, but when I run the index.html as specified in the official website

It in browser console, it couldn't fine runtime.js and flavour/widgets.css teavm-issue

And another comment I have is, in the target/ folder it has java style exploded war like WEB-INF along with teavm folder with generated js, But I believe both are independent.

sairaghavak avatar May 11 '19 13:05 sairaghavak

Glad you are trying out TeaVM and Flavour!

Neither of the warnings is a serious problem, fortunately.

  • runtime.js is no longer generated, now all code is placed in classes.js. You can safely remove the runtime.js line from your HTML file.
  • flavour/widgets.css is only needed if you are using the advanced components. See the documentation here: http://teavm.org/docs/flavour/advanced-ui-components.html

And you are right, both the raw site and the WAR file are produced from the build. You can use either one.

The only absolutely required files for deployment are:

  • index.html
  • teavm/classes.js
  • css/app.css (plus any other CSS files you add)

The rest of the files are for debugging or WAR packaging.

Please post again if you have any more questions.

ScraM-Team avatar May 11 '19 23:05 ScraM-Team

Hi. I just generated the basic example as in the getting started guide and the reference to runtime.js is still there in the index.html. Maybe it could be a good idea to remove it?

aghasemi avatar Nov 10 '20 09:11 aghasemi