2

I have been trying to debug my libgdx code on HTML, the building process happens perfectly when I use the default libgdx new project code, but if I change it to my code this happens:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':html:superDev'.
> Process 'command 'C:\Program Files (x86)\Java\jdk1.7.0_51\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

Worth point that my code can be build for desktop, the only problem is while building for HTML

I suspect the problem is happening because my code has a nested class, Actor. Somewhere I read libgdx has some problems recognizing classes and here one of the answers was from somebody who had a problem with the classes and fixed it editing a XML but I don't know if that is my case.

My code is here

This is the log while adding --stacktrace

Community
  • 1
  • 1
  • Have you considered what the message suggests you? – Eric Martinez May 29 '15 at 23:39
  • [Log while adding --info](https://drive.google.com/file/d/0B91YqboDcq1Zbk5DeTBzSXpuUzQ/view?usp=sharing) [Log while adding --debug](https://drive.google.com/file/d/0B91YqboDcq1ZcTRqaUNZXzVSZ0U/view?usp=sharing) – Itzel Carolina Delgadillo May 30 '15 at 00:04
  • I don't know much what to say, it's quite strange that error, I've seen it while I'm using Android but the error says nothing. Now, by reading your stracktrace you can see that it fails because the port where it starts is being used, have you "killed" java for everytime you start the project? Here are some answers por the same error (for Android in this case, but it can give you a hint) http://stackoverflow.com/questions/29045129/android-java-exe-finished-with-non-zero-exit-value-1 – Eric Martinez May 30 '15 at 00:22
  • You're right in that, just killed java and got a diferent stacktrace, same error though. Just updated it in my question. – Itzel Carolina Delgadillo May 30 '15 at 00:51
  • The new error message lead me to this http://stackoverflow.com/questions/11548068/using-java-util-scanner-with-gwt. Give it a try. – Eric Martinez May 30 '15 at 01:00
  • Just got rid of scanner now it works, thanks. For anyone who gets in the same error, make sure all the JRE classes or methods you are using are being emulated by libgdx, check [here](http://www.gwtproject.org/doc/latest/RefJreEmulation.html) – Itzel Carolina Delgadillo May 30 '15 at 02:07

1 Answers1

2

For anyone who has the same error, please check that all the JRE classes or methods you are using are being emulated. You can check all the emulated packages here. If you are importing a package or using some method that is not there you'll have to stop using it in order to build in HTML.