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
When running the build for the TotalCross bytecode, we get exception if running on a headless mode #27
Comments
It seems you are using a version of Java OpenJDK8-headless that does not comes with the sun.* package required for convert all required images inside the project to png. In order to solve this we need to find another way to convert these images without using sun.* packages |
@ItaloYeltsin if it is just a matter to convert them to PNG, this could be easily done. |
Yeap, I've just edited my answer! |
A very easy way to reproduce this error is using |
this is a little bit more complicated than we thought. Actually, the the reason why we make this conversion is to make an abstraction of gif inside a png. So, what happen is that we get all frames from gif file and put it them side by side in a .png file, so its possible to play the animation on runtime. We really need to keep this process. On the other hand, we could add a library to do this instead of using the sun libraries. |
…ava headless. Deploy uses TotalCross' Image class to convert unsupported image formats to PNG, and this process relied on classes from java.awt and Toolkit, which may not be available on headless distros. Changed implementation of ImageLoader to perform this conversion using ImageIO instead, with some refactoring along the way for clarity. the problem with deploying totalcross java components from api to tcz when using Java Headless. Fixes #27
Deploy uses TotalCross' Image class to convert unsupported image formats to PNG, and this process relied on classes from java.awt and Toolkit, which may not be available on headless distros. Changed implementation of ImageLoader to perform this conversion using ImageIO instead, with some refactoring along the way for clarity. Fixes #27
…#45) Deploy uses TotalCross' Image class to convert unsupported image formats to PNG, and this process relied on classes from java.awt and Toolkit, which may not be available on headless distros. Changed implementation of ImageLoader to perform this conversion using ImageIO instead, with some refactoring along the way for clarity. Fixes #27 Co-authored-by: Fabio <flsobral@gmail.com>
…#45) Deploy uses TotalCross' Image class to convert unsupported image formats to PNG, and this process relied on classes from java.awt and Toolkit, which may not be available on headless distros. Changed implementation of ImageLoader to perform this conversion using ImageIO instead, with some refactoring along the way for clarity. Fixes #27 Co-authored-by: Fabio <flsobral@gmail.com>
…#45) Deploy uses TotalCross' Image class to convert unsupported image formats to PNG, and this process relied on classes from java.awt and Toolkit, which may not be available on headless distros. Changed implementation of ImageLoader to perform this conversion using ImageIO instead, with some refactoring along the way for clarity. Fixes #27 Co-authored-by: Fabio <flsobral@gmail.com>
The below exceptions is raised:
It seems to come from:
https://github.com/TotalCross/totalcross/blob/develop/TotalCrossSDK/src/main/java/totalcross/ui/Spinner.java#L75
However, it seems that it is trying to load a spinner image even on headless mode.
Is it possible to be avoided?
The text was updated successfully, but these errors were encountered: