-
Notifications
You must be signed in to change notification settings - Fork 30
BuildingJ2S
abego edited this page Jun 27, 2017
·
4 revisions
(Work in progress)
If you just want to use Java2Script to run your Java code as JavaScript you don't need the information on this page. However if you want to build Java2Script itself, e.g. to contribute to its development, this page describes how you can actually build Java2Script.
Make sure you have Eclipse and the Java2Script plugins installed. (See Install Java2Script)
Clone the Java2Script Git repository to your local machine. (https://github.com/java2script/java2script.git)
- Open Eclipse (4.6 or later)
- Create a new workspace for your work with Java2Script ("File > Switch Workspace > Other...") and go to the "Workbench".
- Import the Java2Script projects into the workspace:
- Select "File > Import... > General > Existing Projects into Workspace"
- (The "Import" dialog opens)
- In "Select root directory:" select the java2script root directory from the cloned Git repository (contains "demo", "incubator", "sources", "tests")
- In the "Projects" list uncheck the following projects, to exclude them from the workspace:
- net.sf.j2s.doc.user-guide
- net.sf.j2s.java.org.eclipse.core.commands
- net.sf.j2s.java.org.eclipse.core.runtime
- net.sf.j2s.java.org.eclipse.jface
- net.sf.j2s.java.org.eclipse.osgi
- net.sf.j2s.java.org.eclipse.swt
- net.sf.j2s.java.org.eclipse.swt.laf
- net.sf.j2s.test.ajax
- net.sf.j2s.test.jface
- net.sf.j2s.test.swt
- org.eclipse.swt.examples
- org.eclipse.swt.snippets
- org.java2script.demo.gtalk
- Click "Finish"
- (The import will proceed.)
- (After the build several problems are reported. We will take care about that soon.)
- In "Eclipse > Preferences..." select "Java > Compiler > Errors/Warnings"
- Change the severity level of the following problems from "Warning" to "Ignore":
- "Potential programming problems > Serializable class without serialVersionUID"
- "Deprecated and restricted API > Deprecated API"
- "Deprecated and restricted API > Discouraged reference (access rules)"
- "Unnecessary Code > Unused import"
- "Generic types > Unchecked generic type operation"
- "Generic types > Usage of a raw type"
- Click "OK" to confirm the changes
- (A dialog "Error/Warnings Settings Changed" appears)
- Click "Yes" to start a full build with the new settings.
...