Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile simple Java interface #70

Closed
renatoathaydes opened this issue Apr 18, 2019 · 1 comment

Comments

@renatoathaydes
Copy link

commented Apr 18, 2019

Related to the previous ticket: #69

I tried to create my own interface for a click handler:

import com.leaningtech.client.EventListener;
import com.leaningtech.client.MouseEvent;

@FunctionalInterface
public interface MyEventListener extends EventListener
{
    void handle( MouseEvent event );
}

Now, my program cannot be compiled with cheerpjfy.py:

Compiling jar  target/cheerpj-tutorial-1.0-SNAPSHOT.jar
compiling Main.class ...
compiling MyEventListener.class ...
Failure compiling MyEventListener.class
command: /home/renato/cheerpj_1.3/bin/cheerpj "" -llvm -llvm-exceptions -cp /tmp/tmpk7sxh2y0/rt.jar.dir/ MyEventListener.class
@alexp-sssup

This comment has been minimized.

Copy link

commented Apr 23, 2019

The crash is caused by the compiler not having access to the definitions from the cheerpj-dom JAR. This is the command that you should be using

/cheerp_path/cheerpjfy --deps /cheerp_path/cheerpj-dom.jar target/cheerpj-tutorial-1.0-SNAPSHOT.jar

It should be noted that at this stage defining arbitrary DOM/JS objects from Java it is not supported. See the other bug report for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.