Questions tagged [jsweet]
JSweet is a Java to JavaScript transpiler that allows sharing code between client and server.
20
questions
0
votes
1
answer
22
views
What IDE can support Java-to-JavaScript along with Angular?
I'm trying to start a project that'll use Angular to build a web application and re-use/extend my existing (generic) Java code by automatically transpiling it into JavaScript when changes or additions ...
0
votes
0
answers
15
views
JSweet PrinterAdapter misses beforeFooter hook
In JSweet, I need to generate code just before the full generation process completes (e.g. just before the generated TypeScript file is closed). I tried the hook onTranspilationFinished(), but if I ...
0
votes
0
answers
19
views
How to use a custom annotation
With the JSweet toot, I want to generate an annotation in the typescript code, once I encounter a Java annotation on a class. Concretely, I want to accomplish the following:
@com.fasterxml.jackson....
0
votes
0
answers
20
views
JSweet generates __class, which gives an error in the tTypescript compiler
If I generate Typescript based on Java class, below the created Typescript class the following is generated:
Department["__class"] = "org.test.Department";
Compiling it gives:
...
0
votes
0
answers
29
views
Use jsweet to convert applet code to js with .class files dependencies
We have an application that is written in applet, so we are using jsweet to convert the code into js, the application has few files which only has .class files but no java files, it does not show any ...
0
votes
1
answer
121
views
Evaluating Jsweet for applet to HTML conversion
I have been evaluating Jsweet since the past 4 days in order to finalize a tool that can be used to modernize an application from applet to html5/js based front end. I have been able to try the trial ...
0
votes
1
answer
73
views
Using JSweet to Transpile Java->JS, 'matches' error
I'm new to JS. I've written two large Java classes that I want to turn into JS using JSweet. The first smaller one transpiled without issue. With the second, I've hit a wall. It throws this error ...
1
vote
0
answers
73
views
Jsweet library does not work in web application
I have tried transpiling java file to javascript file using jsweet library. It works when I executed via the main method of the java class. But the same code does not work when called via a web ...
0
votes
1
answer
100
views
Transpile java library with JSweet and use it in angular
I just started to learn typescript. I was asked to transpile a java library with JSweet to embed it in an Angular project.
The java library contain only pure logic and do not depends from other ...
0
votes
1
answer
54
views
Run a script after JSweet transpilation
I'm trying to build a TypeScript project with JSweet. After the transpilation, I want to run a script in any language to move some files around; specifically files that are already in TypeScript that ...
0
votes
0
answers
1k
views
MojoFailureException in Eclipse project
I'm using Ecplise for a Java project with Maven and Jsweet.
In my workspace I've got two projects: one of the back-end with the servlets and one of the front-end.
When I tried to compile only the ...
0
votes
0
answers
192
views
Maven multiproject with jsweet (java to Javascript). communication between modules within project
Edit: Enter compiler Failure, thats the error code.
First things first:
Sorry for the massive WallOfCode, tried to give all informations i have.
Hey, this is my first time here. I will try to ...
1
vote
0
answers
57
views
Is it possible to use Jsweet source code Version (2.0.0) to customize JavaScript file
I am using maven and pom.xml to generate javascript from java class. In pom.xml
jsweet's dependency,repository is available there. when i build the project i am finding javascript file.
Now i ...
2
votes
2
answers
361
views
Can JSweet viably port Java libraries for use in cross-built Scala.js projects?
In the search for ways to make Java libraries accessible to both the JavaScript and JVM sides of Scala.js cross-built projects, please consider the following experiment:
Imagine that a Scala.js ...
1
vote
1
answer
367
views
Handling Java annotations in JSweet
I'm attempting to transpile Java model classes to JavaScript using JSweet. The model classes contain JPA annotations like @Column. The transpilation fails as soon as it encounters import javax....
0
votes
1
answer
71
views
How do I get tanh in jsweet?
I am using JSweet to transpile Java into Javascript and I need to use Math.tanh() but it's not available in the jsweet.lang.Math object, but I see it in the source:
https://github.com/cincheo/jsweet/...
2
votes
1
answer
1k
views
Port Java module to JS with JSweet
I would like to convert these Java functions to JavaScript: CircleFitter.java. I don't need the file reading portions though.
JSweet seems like a good option. So, I tried pasting the contents of the ...
3
votes
1
answer
1k
views
Can I write a cast operator in Typescript?
I've used JSWEET to transpile a large Java project. It has converted types like Enumeration<Object> directly to Enumeration<any> in TypeScript.
In the Java world it was possible to assign an ...
4
votes
1
answer
2k
views
Installed jSweet. Now what?
I have a java project which I want to convert into Typescript (about 150 Files).
As per http://www.jsweet.org/getting-started/
...I checked out the jsweet Github project.
...I ran mvn generated-src
...
4
votes
1
answer
497
views
Post Map as JSON using JSweet
I'd like to send a java.util.HashMap converted to JSON from the client to the server.
I'm using JSweet to transpile Java to JavaScript for the client side.
I had a look at XMLHttpRequest and tried ...