|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: SweetHome3DJS - Porting plugin - ARM architecture support |
||
| Print at Dec 18, 2025, 10:30:08 AM |
|
|
| Posted by adizanni at Feb 16, 2024, 4:25:40 PM |
|
SweetHome3DJS - Porting plugin - ARM architecture support Hello, I managed to port my SweetHome3D plugin to a personal custom web site based on SweetHome3DJS. As my plugin is based on a modified OBJWriter to preserve the object names across exports, I need to import the J3D libraries. I have noticed that J3D libraries come with some binaries and I did not find binaries compiled for ARM architecture. My Web Site will run as an add-on to Home Assistant: most of the users are running home assistant on ARM architectures (raspberry and similar). Is there a way to have those libraries in armv7 or armv8 architectures ? I will soon post my source in GitHub. Thanks in advance for the support Andrea |
| Posted by Puybaret at Feb 16, 2024, 5:52:56 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support You’ll find the libraries in the JAR files at https://jogamp.org/deployment/jogamp-current/jar/ Pick up the files prefixed by gluegen-rt-natives and jogl-all-natives, probably gluegen-rt-natives-linux-armv6hf.jar and jogl-all-natives-linux-armv6hf.jar. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by Puybaret at Feb 16, 2024, 5:58:47 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support By the way, you should choose a license for your plug-in project. If you plan to distribute it along with Sweet Home 3D in the same package, it should be under GNU GPL, otherwise if you distribute it separately, any license will be ok. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by adizanni at Feb 16, 2024, 6:42:28 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support Thanks, I'll test. Added a GNU-GPL license file to the github repository for the plugin (it contains the SweetHome3d portable jar). I will do the same for the Home Assistant add-on |
| Posted by Puybaret at Feb 16, 2024, 7:28:56 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support Don’t hesitate to ask questions if needed. If all goes well and you want to run Sweet Home 3D from a JAR executable file, you should have to update SweetHome3DBootstrap class and jarExecutable target in build.xml file. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by adizanni at Feb 16, 2024, 7:59:47 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support I have the impression that those libraries require a desktop environment: Root Cause is the lack of a X!! Display, but the libraries will have to run headless in a server like environment inside a container. Type Exception Report Message An exception occurred processing [/exportToHA.jsp] at line [89] Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.apache.jasper.JasperException: An exception occurred processing [/exportToHA.jsp] at line [89] 86: } 87: } 88: 89: BranchGroup root = new BranchGroup(); 90: Object3DBranchFactory objectFactory = new Object3DBranchFactory(); 91: 92: // Add 3D ground, walls, rooms and labels Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:610) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:489) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Root Cause jakarta.servlet.ServletException: java.lang.ExceptionInInitializerError org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:667) org.apache.jsp.exportToHA_jsp._jspService(exportToHA_jsp.java:383) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Root Cause java.lang.ExceptionInInitializerError javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155) javax.media.j3d.BranchGroupRetained.<init>(BranchGroupRetained.java:50) javax.media.j3d.BranchGroup.createRetained(BranchGroup.java:72) javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114) javax.media.j3d.Node.<init>(Node.java:172) javax.media.j3d.Group.<init>(Group.java:551) javax.media.j3d.BranchGroup.<init>(BranchGroup.java:63) org.apache.jsp.exportToHA_jsp._jspService(exportToHA_jsp.java:278) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Root Cause java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:854) javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:267) javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155) javax.media.j3d.BranchGroupRetained.<init>(BranchGroupRetained.java:50) javax.media.j3d.BranchGroup.createRetained(BranchGroup.java:72) javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114) javax.media.j3d.Node.<init>(Node.java:172) javax.media.j3d.Group.<init>(Group.java:551) javax.media.j3d.BranchGroup.<init>(BranchGroup.java:63) org.apache.jsp.exportToHA_jsp._jspService(exportToHA_jsp.java:278) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Note The full stack trace of the root cause is available in the server logs. |
| Posted by adizanni at Feb 16, 2024, 8:18:33 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support To explain better what I'm doing:
I was assuming that the SweetHome3D could run headless. It seems that the Home class and Homerecorder class can run headless, but as soon as I reference the J3D class, the exception is raised for lack of a display. This is a pity as I only use J3D to serialize the home into Waterfront format (based on a modified ObjWriter class). This is an operation that wouldn't require any visualization. |
| Posted by adizanni at Feb 16, 2024, 8:42:17 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support I've tried to do it using the jogl-noawt library, same error. Then I stumbled across this forum thread: https://forum.jogamp.org/Java3D-in-batch-mode-td4039415.html And this seems pretty much a final word: my idea is not feasible. I think that your effort to keep the code within a MVC model is nullified by an external library. Maybe I can port the OBJWriter to JavaScript but this is kind of another size.... |
| Posted by Puybaret at Feb 16, 2024, 9:08:23 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support Sweet Home 3D can run headless if you set the Java property java.awt.headless to true (which is probably the default value in Tomcat) and set the Java property j3d.rend to noop. You may even need no library in that case but I’m not sure. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by adizanni at Feb 16, 2024, 10:01:54 PM |
|
Re: SweetHome3DJS - Porting plugin - ARM architecture support Thanks again. It worked. When I will be more stable I will test it without ogl and gluegen libraries.... |
|
|
|
Current timezone is GMT Dec 18, 2025, 10:30:08 AM |