1- SwingJS distribution README.txt
1+ SwingJS distribution
22
3- 3/15/2018 Bob Hanson hansonr@stolaf.edu
3+ https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.core/dist/dropins/README.txt
44
5- SwingJS has been successfully tested in Eclipse Neon and Oxygen on Mac and Windows platforms.
5+ 7/15/2018 Bob Hanson hansonr@stolaf.edu
6+
7+ net.sf.j2s.core_3.2.1.jar replaces net.sf.j2s.core_3.1.1.jar
8+
9+ These versions differ only in their internal workings relative to Eclipse.
10+ Most importantly, the requirement that the .project file be changed to
11+ indicate a customized Java builder is dropped in version 3.2.1, which just uses
12+ the standard Eclipse java builder, org.eclipse.jdt.core.javabuilder.
13+
14+ Thus, to get started, all you need are:
15+
16+ 1) the latest transpiler from
17+
18+ https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.core/dist/dropins
19+
20+ 2) the latest JavaScript-site.zip from
21+
22+ https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.java.core/dist
23+
24+ 3) an empty .j2s file in your project directory. (The v.3.2.1 transpiler will fill this in with
25+ a default .j2s configuration when it runs the first time.)
26+
27+
28+ NOTE! If you are updating to 3.2.1 from 3.1.1, be sure to open your .project file and change the
29+ builder name from net.sf.j2s.core.java2scriptbuilder back to org.eclipse.jdt.core.javabuilder
30+ or your project will no longer compile.
31+
32+ Comments below have been adjusted for these differences.
33+
34+ SwingJS has been successfully tested in Eclipse version Neon-Photon on Mac and Windows platforms.
635(No reason to believe it would not also work for Linux; just haven't tried that recently.)
736
837INSTALLATION INSTRUCTIONS
@@ -13,8 +42,13 @@ Eclipse Neon or higher is necessary.
1342Installing the Java2Script transpiler as an Eclipse plug-in
1443-----------------------------------------------------------
1544
16- The Java2Script transpiler for SwingJS is in net.sf.j2s.core.jar. It parses the .java code and
17- creates .js files that match the standard .class files created by the Eclipse Java compiler.
45+ The Java2Script transpiler for SwingJS is net.sf.j2s.core.jar. It rides along with the
46+ Eclipse Java compiler as a "CompilationParticipant"
47+
48+ https://help.eclipse.org/photon/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/compiler/CompilationParticipant.html
49+
50+ listening for updates to the source files and converting them on the fly to .js files
51+ that match the standard .class files created by the Eclipse Java compiler itself.
1852
1953Note that both Java .class files (in bin/) and JavaScript .js files (in site/swingjs/j2s) are
2054created automatically anytime you do any building of your project.
@@ -30,17 +64,29 @@ https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.core/dis
3064
3165into your eclipse/dropins directory.
3266
33- Do not use net.sf.j2s.core_x.x.x.jar for this, as, if you do that, some versions of Eclipse will have to be
67+ Also provided in that directory is a ver/ directory with previous core files.
68+ It is recommended that you not use them. If you do, be sure to remove their _x.x.x version
69+ signature from their file name, or some versions of Eclipse will have to be
3470entirely reinstalled every time you change versions. We do not know why this is necessary,
35- but it appears to be. If you leave the version in the name, Eclipse will not be able to replace it with a
36- newer version later. From what we can tell. So just always use dist/dropins/net.sf.j2s.core.jar.
71+ but it appears to be. This is an Eclipse bug. So just always use dist/dropins/net.sf.j2s.core.jar.
3772
38- On Mac systems, the Eclipse directory is
73+ On Mac systems, the Eclipse directory is generally
3974
4075/Applications/Eclipse.app/Contents/Eclipse/dropins
4176
42772. Restart Eclipse and check for the presence of the plug-in at
4378 help...about Eclipse...installation details...Plug-ins...(wait several seconds for tabulation)
79+
80+ Note relating to updating to 3.2.1 from 3.1.1 version of Java2Script:
81+
82+ If the version on this readout does not match the version that is
83+ reported at the end of each .js file created:
84+
85+ //Created 2018-07-15 04:35:10 net.sf.j2s.core.jar v. 3.2.1
86+
87+ then there is no real problem, but you can correct that by restarting
88+ Eclipse once with the -clean flag.
89+
4490
4591search for "j2s" to find j2s.sourceforge.net Java2Script Core
4692
@@ -67,7 +113,7 @@ All of the JavaScript produced will be in the project site/ directory.
67113You must prepopulate this site with all the JavaScript required by the
68114JavaScript version of the JVM. The most recent version of site/ is at
69115
70- https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.java.core/SwingJS-site.zip?raw=true
116+ https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.java.core/dist/ SwingJS-site.zip?raw=true
71117
72118Occasional additions to the java.* classes are made to the above-mentioned zip file.
73119
0 commit comments