Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 10
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2334 times and has 9 replies Next Thread
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
building SWJS

Hi all

I've been trying to build the SWJS project for about 10 hours but without success. I gave up the idea to build it under windows and installed an Ubuntu image.

From what I understand :
- I use the source project here : https://sourceforge.net/projects/sweethome3d/files/SweetHome3D-viewer/ and here : https://sourceforge.net/projects/sweethome3d/files/SweetHome3D-source/
- I put both project at the root of the same folder : TEST/SweetHome3D-7.1-src and TEST/SweetHome3DJS-7.1-src
- Ant installed : Apache Ant(TM) version 1.10.7 compiled on October 24 2019
- openjdk 17.0.6 2023-01-17 Java works in the console
- ant BUILD SUCCESSFUL for Java Sweethome
- ant in SWJS folder :

Buildfile: /home/toto/TEST/SweetHome3DJS-7.1-src/build.xml

viewerLibraries:

transpiledLibraries:
[javac] /home/toto/TEST/SweetHome3DJS-7.1-src/build.xml:32: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[java] INFO: JSweet transpiler version 3.2.0-SNAPSHOT (build date: 2021-07-28 14:35:21)
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:682 - input dirs: [../SweetHome3D/src, tools/JSweet/src]
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:694 - classpath: null
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:709 - included: [def.*, com/eteks/sweethome3d/model.*, com/eteks/sweethome3d/tools.*, com/eteks/sweethome3d/viewcontroller.*, com/eteks/sweethome3d/io.*]
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:710 - excluded: []
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:715 - add sources from directory: ../SweetHome3D/src
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:715 - add sources from directory: tools/JSweet/src
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:760 - ts output dir: tools/JSweet/build/ts
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:767 - js output dir: tools/JSweet/build/js
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:423 - no configuration file found at /home/toto/TEST/SweetHome3DJS-7.1-src/./jsweetconfig.json
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:528 - creating transpiler version 3.2.0-SNAPSHOT (build date: 2021-07-28 14:35:21)
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:530 - current dir: /home/toto/TEST/SweetHome3DJS-7.1-src/.
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:531 - base directory: /home/toto/TEST/SweetHome3DJS-7.1-src/.
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:532 - working directory: /home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/jsweet.tmp
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:533 - tsOut: tools/JSweet/build/ts - /home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/ts
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:534 - jsOut: tools/JSweet/build/ts - /home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/ts
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:535 - candyJsOut: tools/JSweet/build/js
[java] 2023-04-15 03:26:38.038 INFO JSweetTranspiler:536 - factory: com.eteks.sweethome3d.jsweet.SweetHome3DJSweetFactory@5f150435
[java] 2023-04-15 03:26:38.038 INFO CandyProcessor:123 - candies processor classpath: /home/toto/TEST/SweetHome3DJS-7.1-src/./jsweet_extension:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-transpiler-3.2.0-SNAPSHOT-jar-with-dependencies.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/bigjs-3.1.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-awtgeom-1.8.132-20200519.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-batik-svgpathparser-1.10.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-swingundo-1.8.132-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-core-6.3.1.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/SweetHome3DJSweetExtension
[java] 2023-04-15 03:26:38.038 INFO CandyProcessor:141 - extracted candies directory: tools/JSweet/build/js
[java] 2023-04-15 03:26:38.038 INFO JSweetCommandLineLauncher:891 - definition input dirs: []
[java] 2023-04-15 03:26:38.038 INFO ProcessUtil:138 - cannot find tsc - searching in /home/toto/.jsweet.v3-node_modules
[java] 2023-04-15 03:26:38.038 INFO CandyProcessor:226 - 6 candies found in classpath
[java] 2023-04-15 03:26:38.038 INFO CandyProcessor:163 - candies are up to date
[java] fatal error in transpiler
[java] java.lang.ExceptionInInitializerError
[java] at org.jsweet.transpiler.JSweetContext.<init>(JSweetContext.java:730)
[java] at org.jsweet.transpiler.JSweetFactory.createContext(JSweetFactory.java:39)
[java] at org.jsweet.transpiler.JSweetTranspiler.prepareForJavaFiles(JSweetTranspiler.java:715)
[java] at org.jsweet.transpiler.JSweetTranspiler.java2ts(JSweetTranspiler.java:885)
[java] at org.jsweet.transpiler.JSweetTranspiler.transpile(JSweetTranspiler.java:836)
[java] at org.jsweet.JSweetCommandLineLauncher$JSweetTranspilationTask.run(JSweetCommandLineLauncher.java:897)
[java] at org.jsweet.JSweetCommandLineLauncher.transpileWithArgs(JSweetCommandLineLauncher.java:272)
[java] at org.jsweet.JSweetCommandLineLauncher.main(JSweetCommandLineLauncher.java:240)
[java] Caused by: java.lang.RuntimeException: Fatal error - cannot access legacy Javac API
[java] at org.jsweet.transpiler.util.Util.<clinit>(Util.java:2526)
[java] ... 8 more
[java] Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field public com.sun.tools.javac.code.Type com.sun.tools.javac.tree.JCTree.type accessible: module jdk.compiler does not "exports com.sun.tools.javac.tree" to unnamed module @336eb6ed
[java] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
[java] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
[java] at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
[java] at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
[java] at org.jsweet.transpiler.util.Util.<clinit>(Util.java:2522)
[java] ... 8 more

BUILD FAILED
/home/toto/TEST/SweetHome3DJS-7.1-src/build.xml:81: The following error occurred while executing this line:
/home/toto/TEST/SweetHome3DJS-7.1-src/build.xml:37: Java returned: 255

Im a bit lost :(
[Apr 15, 2023, 2:27:30 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9388
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

Try with Java 11 (not 17) and Node 14.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Apr 15, 2023, 8:01:52 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

Done, but it wasnt working : can not find tsc

Finally, I found an option by googling and running this :
npm install typescript -g

Build FINE
[Apr 15, 2023, 6:43:16 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

My new error :

Buildfile: /home/toto/TEST/SweetHome3DJS-7.1-src/build.xml

viewerLibraries:

transpiledLibraries:
[javac] /home/toto/TEST/SweetHome3DJS-7.1-src/build.xml:32: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[java] INFO: JSweet transpiler version 3.2.0-SNAPSHOT (build date: 2021-07-28 14:35:21)
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:682 - input dirs: [../SweetHome3D/src, tools/JSweet/src]
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:694 - classpath: null
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:709 - included: [def.*, com/eteks/sweethome3d/model.*, com/eteks/sweethome3d/tools.*, com/eteks/sweethome3d/viewcontroller.*, com/eteks/sweethome3d/io.*]
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:710 - excluded: []
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:715 - add sources from directory: ../SweetHome3D/src [java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:715 - add sources from directory: tools/JSweet/src
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:760 - ts output dir: tools/JSweet/build/ts
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:767 - js output dir: tools/JSweet/build/js
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:423 - no configuration file found at /home/toto/TEST/SweetHome3DJS-7.1-src/./jsweetconfig.json
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:528 - creating transpiler version 3.2.0-SNAPSHOT (build date: 2021-07-28 14:35:21)
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:530 - current dir: /home/toto/TEST/SweetHome3DJS-7.1-src/.
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:531 - base directory: /home/toto/TEST/SweetHome3DJS-7.1-src/. [java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:532 - working directory: /home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/jsweet.tmp
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:533 - tsOut: tools/JSweet/build/ts - /home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/ts
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:534 - jsOut: tools/JSweet/build/ts - /home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/ts
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:535 - candyJsOut: tools/JSweet/build/js
[java] 2023-04-15 20:02:25.025 INFO JSweetTranspiler:536 - factory: com.eteks.sweethome3d.jsweet.SweetHome3DJSweetFactory@614c5515
[java] 2023-04-15 20:02:25.025 INFO CandyProcessor:123 - candies processor classpath: /home/toto/TEST/SweetHome3DJS-7.1-src/./jsweet_extension:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-transpiler-3.2.0-SNAPSHOT-jar-with-dependencies.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/bigjs-3.1.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-awtgeom-1.8.132-20200519.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-batik-svgpathparser-1.10.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-swingundo-1.8.132-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-core-6.3.1.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/SweetHome3DJSweetExtension
[java] 2023-04-15 20:02:25.025 INFO CandyProcessor:141 - extracted candies directory: tools/JSweet/build/js
[java] 2023-04-15 20:02:25.025 INFO JSweetCommandLineLauncher:891 - definition input dirs: []
[java] 2023-04-15 20:02:25.025 INFO ProcessUtil:138 - cannot find tsc - searching in /home/toto/.jsweet.v3-node_modules
[java] WARNING: An illegal reflective access operation has occurred
[java] WARNING: Illegal reflective access by org.jsweet.transpiler.util.Util (file:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-transpiler-3.2.0-SNAPSHOT-jar-with-dependencies.jar) to field com.sun.tools.javac.tree.JCTree.type
[java] WARNING: Please consider reporting this to the maintainers of org.jsweet.transpiler.util.Util
[java] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[java] WARNING: All illegal access operations will be denied in a future release
[java] 2023-04-15 20:02:25.025 INFO CandyProcessor:226 - 6 candies found in classpath
[java] 2023-04-15 20:02:25.025 INFO CandyProcessor:163 - candies are up to date
[java] 2023-04-15 20:02:25.025 INFO JavaCompilationComponents:122 - creating JavaCompiler task with options: JavaCompilerOptions: [--module-path, /home/toto/TEST/SweetHome3DJS-7.1-src/./jsweet_extension:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-transpiler-3.2.0-SNAPSHOT-jar-with-dependencies.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/bigjs-3.1.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-awtgeom-1.8.132-20200519.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-batik-svgpathparser-1.10.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-swingundo-1.8.132-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-core-6.3.1.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/SweetHome3DJSweetExtension, -cp, /home/toto/TEST/SweetHome3DJS-7.1-src/./jsweet_extension:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-transpiler-3.2.0-SNAPSHOT-jar-with-dependencies.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/bigjs-3.1.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-awtgeom-1.8.132-20200519.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-batik-svgpathparser-1.10.0-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/j4ts-swingundo-1.8.132-20170726.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/lib/jsweet-core-6.3.1.jar:/home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/SweetHome3DJSweetExtension, -Xlint:path, -encoding, ISO-8859-1]
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1170 - creating bundle file: tools/JSweet/build/ts/bundle.ts
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1227 - created tools/JSweet/build/ts/bundle.ts
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1145 - scanning tools/JSweet/src/def/sweethome3d/SweetHome3D.java...
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1145 - scanning tools/JSweet/src/def/sweethome3d/SAXParser.java...
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1145 - scanning tools/JSweet/src/def/sweethome3d/Scene3D.java...
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1145 - scanning tools/JSweet/src/def/sweethome3d/Core.java... [java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1170 - creating bundle file: tools/JSweet/build/ts/bundle.d.ts
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:1227 - created tools/JSweet/build/ts/bundle.d.ts
[java] 2023-04-15 20:02:26.026 INFO JSweetTranspiler:865 - ts2js on org.jsweet.transpiler.TypeScript2JavaScriptWithTscTranspiler@36546a22 sourceFiles=4
[java] 2023-04-15 20:02:26.026 INFO TypeScript2JavaScriptWithTscTranspiler:84 - launching tsc...
[java] 2023-04-15 20:02:26.026 INFO ProcessUtil:138 - cannot find tsc - searching in /home/toto/.jsweet.v3-node_modules
[java] 2023-04-15 20:02:27.027 INFO JSweetTranspiler:849 - transpilation process finished in 1388 ms
[java] > java2ts: 405.615265ms
[java] > ts2js: 940.755917ms
[java]
[java] INFO: transpilation successfully completed with no errors and no warnings

BUILD FAILED
/home/toto/TEST/SweetHome3DJS-7.1-src/build.xml:85: Warning: Could not find file /home/toto/TEST/SweetHome3DJS-7.1-src/tools/JSweet/build/js/bundle.js to copy.
[Apr 15, 2023, 7:04:56 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

It is strange, apparently, it creates :
JSweetTranspiler:1227 - created tools/JSweet/build/ts/bundle.ts

and it requires :

tools/JSweet/build/js/bundle.js
[Apr 15, 2023, 7:06:37 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

openjdk 11.0.18 2023-01-17
Apache Ant(TM) version 1.10.7
node v14.21.3
[Apr 15, 2023, 7:09:29 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9388
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

It states that it cannot find tsc.
Maybe this could help.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Apr 15, 2023, 8:52:20 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

... no success tonight
apparently it looks for : /home/toto/.jsweet.v3-node_modules
and my running TSC is in /usr/bin

which linux distro are you using ?
[Apr 15, 2023, 11:11:10 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9388
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

I’m a macOS user. Not sure I tried to build SweetHome3D JS on Linux once, but sure I tried under Windows.
Anyway, this seems to be just a PATH problem.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Apr 15, 2023, 11:49:35 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: building SWJS

So I try again on Windows and it works fine.
By reading build.xml I understood that the folders structure must be :
\TEST\SweetHome3DJS
\TEST\SweetHome3D

et not the one I had :
\TEST\SweetHome3DJS-7.1-src
\TEST\SweetHome3D-7.1-src


Yeaaa !!! Dit it !
[Apr 16, 2023, 1:03:07 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved