|
Sweet Home 3D Forum » List all forums » » Forum: Features use and tips » » » Thread: Integrating Sweet Home 3D Viewer in a webpage |
||
| Print at Feb 6, 2026, 7:29:42 PM |
|
|
| Posted by KenowaX at Nov 26, 2014, 4:01:56 PM |
|
Integrating Sweet Home 3D Viewer in a webpage Hi, I'm using an online web creation service which allows me to upload files to my website but does not allow me to insert the files into folders. Therefore, all my files for Sweet Home 3D Viewer are in the following URL : www.mywebsite.com/files/theme/ Having uploaded the files to the theme folder (no other folders possible) I changed the HTML script as follows to add the applet to my website : <!--However, when I try to launch the app on my website, I get the following error : Cannot load ressource : www.mywebsite.com/files/theme/lib/SweetHome3DViewer.jar That is normal since the file is not in the lib folder. It is in the theme folder. Is there any way to fix this ? Thank you, |
| Posted by Puybaret at Nov 26, 2014, 6:30:01 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage Actually, the changes you made on the value of the jars variable and codebase attribute have an effect only with Java 6. Under Java 7 and further, I think that the JRE always uses the jnlp_embedded parameter after decoding it from Base 64. As the jnlp_embedded parameter proposed in the default configuration tries to download jar files from lib subfolder, that would explain the error you reported. To fix it, you should download the SweetHome3DViewer.jnlp file that was used to generate the current value of the jnlp_embedded parameter, update the href attribute of its <jar> elements with a text editor and save it. Then, convert the modified file to Base 64 and copy the encoded string in jnlp_embedded parameter. By the way, there must be a typo in your homeURL parameter where a colon is missing after http. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by KenowaX at Nov 26, 2014, 7:04:30 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage Thank you for your reply. I tried what you suggested. However, now, the app doesn't even show up on the website. I got the following code from the BASE64 encryption : PD94bWwgdmVyc2lvbj0iMS4wIj8+Cg0KPCEtLQogICANClN3ZWV0SG9tZTNEVmlld2VyLmpubHANI got the code by encrypting this text file : <?xml version="1.0"?>Could you help me, please ? |
| Posted by KenowaX at Nov 26, 2014, 8:11:09 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage Alright, I managed to code it right. Apparantly, it needed to be encoded with a certain character encryption. Anyway, now I have another problem. The app loads correctly. But after loading, it stays blank or I get a JNLP Signing Exception error. It reads "Cannot validate signature of the launch file. The version signed does not correspond to the version downloaded." Could you help me, please ? |
| Posted by KenowaX at Nov 27, 2014, 11:55:57 AM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage I've tried to see where this error could come from. Apparently, just modifying a tiny bit the jnlp file then converting it generates this error. That is quite bothering if I cannot modify this file... I have no idea of how the Java signatures work. |
| Posted by KenowaX at Nov 27, 2014, 12:57:11 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage I've tried to modify the SweetHome3DViewer.jar and changing the JNLP file inside it. Now I get a NullPointerException. |
| Posted by Puybaret at Nov 27, 2014, 1:18:03 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage I forgot about the JNLP file in the SweetHome3DViewer.jar that should match the one you change. Updating it in the jar file isn't enough, you will have also to sign again all the jars with your own software certificate to make it work. If you don't have a certificate, you may try also to simply remove the JNLP file from SweetHome3DViewer.jar. I think it will work but the JRE will display a warning. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by KenowaX at Nov 27, 2014, 1:28:44 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage Alright, I tried what you suggested. I get a ClassNotFoundException error. It says the class com.eteks.sweethome3d.applet.SweetHome3DViewer cannot be found. This is strange as it is in fact inside the JAR file... |
| Posted by KenowaX at Nov 27, 2014, 3:49:20 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage I forgot to mention what I actually did. Since I don't have any certificates, I tried removing the JNLP. I removed the JNLP folder in the JAR and I removed every references to the JNLP file from the MANIFEST file inside the META-INF folder. After this, I repacked the JAR file. I removed the references to the JNLP from the HTML file and tried to load it. After the app has loaded, I get the error previously mentionned. |
| Posted by KenowaX at Nov 27, 2014, 4:04:32 PM |
|
Re: Integrating Sweet Home 3D Viewer in a webpage In case you need the codes, here they are : <!-- |
|
|
|
Current timezone is GMT Feb 6, 2026, 7:29:42 PM |