Installation"
m (correct highlight (via JWB)) |
|||
(35 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{ZKStudioEssentialsPageHeader}} | {{ZKStudioEssentialsPageHeader}} | ||
− | |||
− | |||
− | |||
− | |||
− | = | + | = Prerequisite = |
− | + | There are some software you need to install before installing ZK Studio. | |
− | JDK | + | == Java SE Development Kit (JDK) == |
− | + | Java version 6 or later is required in order to run Eclipse with ZK Studio, you can download it from [http://www.oracle.com/technetwork/java/javase/downloads Oracle official site]. | |
− | + | == Eclipse IDE for Java EE Developers == | |
− | + | ZK Studio is an Eclipse Plug-in, therefore you must install Eclipse. We recommend the '''Eclipse IDE for Java EE Developers''' package. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ZK | ||
'''Install:''' | '''Install:''' | ||
− | + | Installation is done simply by extracting the downloaded zip file to a proper local folder. To make sure Eclipse can run on your system, execute <code>eclipse.exe</code> (in Windows) or <code>eclipse</code> (in Unix or Linux). You can locate these files in your extracted eclipse folder. | |
− | |||
'''Tips:''' | '''Tips:''' | ||
− | + | # We recommend modifying some parameters in the configuration file <code>eclipse.ini</code> which will result in performance gain, please refer [http://www.eclipsezone.com/eclipse/forums/t61618.html here] and [http://blog.xam.dk/archives/68-Eclipse-and-memory-settings.html here]. | |
− | + | # We also recommend setting Eclipse's default JRE to JDK, please refer to the "Setup/Preferences" section in [http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html WTP Tutorials – Building and Running a Web Application]. | |
− | : | + | <!-- |
+ | # We also recommend using the Java Development Kit (JDK) as the default JRE for Eclipse IDE, please follow [[Setting_Default_JRE_In_Eclipse#Setup_Default_JRE_as_JDK | these instructions]] to make the JDK the default JRE. | ||
+ | --> | ||
− | + | == Application Servers == | |
− | + | Before developing web applications in Java using ZK Framework, you need to install an application server. Apache Tomcat is one of the most popular web containers. Tomcat versions 6 and 7 are supported and can be downloaded at [http://tomcat.apache.org Apache Tomcat]. | |
− | |||
− | |||
− | Before developing web applications in Java using | ||
'''Install:''' | '''Install:''' | ||
− | + | : Download the zip file of Tomcat distribution and extract it to a proper location (with no illegal characters or space in the path). Tomcat requires configuration before it can be used with Eclipse, this process is described in the following link [[ZK_Studio_Essentials/Begin_Your_First_ZK_Project/Create_a_New_ZK_Project#Running_the_ZK_Project | Running the ZK Project]]. | |
− | Download the zip file of Tomcat distribution and extract it to a proper location (with no illegal characters or space in the path). Tomcat requires configuration before it can be used with Eclipse, this process is described in the following link [[ZK_Studio_Essentials/Begin_Your_First_ZK_Project/Create_a_New_ZK_Project# | ||
'''Tips:''' | '''Tips:''' | ||
+ | : If you not only want to develop web applications, but also need to deploy them on Apache Tomcat, links to the official installation instructions for directly running Apache Tomcat in your environment are provided below: | ||
+ | :* Tomcat 7: http://tomcat.apache.org/tomcat-7.0-doc/setup.html | ||
+ | :* Tomcat 6: http://tomcat.apache.org/tomcat-6.0-doc/setup.html | ||
− | + | = Install ZK Studio = | |
+ | ZK Studio can be installed in several ways. We recommend to install through Marketplace. | ||
− | |||
− | + | == Marketplace (Since Eclipse 3.6) == | |
+ | Marketplace is the easiest way to install plugins. Go to menu '''[Help] > [Eclipse Markpetplace]''' and search '''"zk studio"''' you'll find '''ZK Studio''' to install. | ||
+ | [[Image:Eclipse36_marketplace.png | center | 500px]] | ||
− | + | == Update Site== | |
+ | <!-- | ||
+ | * The URL of ZK Studio for Eclipse 3.6: http://studio.zkoss.org/resource/plugins/eclipse_3_6 | ||
+ | * The URL of ZK Studio for Eclipse 3.5: http://studio.zkoss.org/resource/plugins/eclipse_3_5 | ||
+ | --> | ||
− | :[http:// | + | # Open Eclipse, click the '''[Help]''' menu and select '''[Install New Software...]'''. A install window will popup, and then click '''Add''' |
+ | #: [[Image:zkstudio_installation_35_1.png| center | 600px]] | ||
+ | #: <br/> | ||
+ | # Name the site as '''"ZK Studio"''' and copy corresponding update site's URL into '''Location''' field and click '''OK'''. | ||
+ | #: The URL of ZK Studio for Eclipse 4.2 and later: http://studio.zkoss.org/resource/plugins/eclipse_4_2 | ||
+ | #: The URL of ZK Studio for Eclipse 3.7: http://studio.zkoss.org/resource/plugins/eclipse_3_7 | ||
+ | #: [[Image:zkstudio_installation_35_2.png | center | 500px]] | ||
+ | #: <br/> | ||
+ | # Expand the update entry of ZK Studio, check '''ZK Studio''' and then click '''Next''' | ||
+ | #: [[Image:zkstudio_installation_35_3.png| center | 600px]] | ||
+ | #: The Eclipse Installation System will now attempt to retrieve information from the update site. This will take some time depending on your eclipse environment, please be patient. | ||
+ | # Click '''Next''' on the pop-up install wizard dialog. | ||
+ | #: [[Image:zkstudio_installation_35_4.png| center | 600px]] | ||
+ | #: <br/> | ||
+ | #: Check '''"I accept the terms of the license agrement"''' and click '''Finish''' on the wizard dialog. | ||
+ | #: [[Image:zkstudio_installation_35_4_licenses.png | center | 600px]] | ||
+ | #: <br/> | ||
+ | #: The Installation process will now begin. | ||
+ | #: [[Image:zkstudio_installation_35_5.png | center | 600px]] | ||
+ | #: <br/> | ||
+ | #: If there is a pop-up dialog with unsigned content warning, please click '''OK''' to continue. | ||
+ | #: [[Image:zkstudio_installation_35_5_warning.png | center | 500px]] | ||
+ | #: <br/> | ||
+ | # Once the installation is complete, please restart Eclipse as prompted. | ||
+ | #: [[Image:zkstudio_installation_35_6.png | center | 500px]] | ||
− | == Installation | + | == Offline Installation== |
+ | # Download the offline installation zip file from [http://www.zkoss.org/download/zkstudio ZK Studio download page]. | ||
+ | # The step is the same as step 1 we do for [[# Update Site| Update Site]]. Open Eclipse, click '''[Help]''' menu and select '''[Install New Software...]'''. An install window will popup, click '''Add''' | ||
+ | # Click '''Archive...''' to open a file explorer. Then, use file explorer to choose downloaded file and click "OK" to install. | ||
+ | #: [[Image:zkstudio_installation_35_manual_2.png | center | 500px]] | ||
− | + | == Activate ZK Studio == | |
− | + | '''Removed''' since ZK Studio 2.0.4. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ZK Studio 2.0.4 and later doesn't require activation. | |
+ | = Visual Editor = | ||
+ | Visual Editor is a deprecated feature, it is no longer included in ZK Studio. There are several alternatives: | ||
+ | * install [https://marketplace.eclipse.org/content/run-jetty-run run jetty run plugin] for eclipse | ||
+ | * [https://www.eclipse.org/jetty/documentation/9.3.x/jetty-maven-plugin.html jetty Maven plugin] | ||
− | + | Add the plugin below in a pom.xml. | |
+ | <source lang='xml'> | ||
+ | <build> | ||
+ | <plugins> | ||
+ | <plugin> | ||
+ | <groupId>org.eclipse.jetty</groupId> | ||
+ | <artifactId>jetty-maven-plugin</artifactId> | ||
+ | <version>9.4.8.v20171121</version> | ||
+ | <configuration> | ||
+ | <webAppConfig> | ||
+ | <contextPath>/${project.artifactId}</contextPath> | ||
+ | <allowDuplicateFragmentNames>true</allowDuplicateFragmentNames> | ||
+ | </webAppConfig> | ||
+ | <scanIntervalSeconds>5</scanIntervalSeconds> | ||
+ | </configuration> | ||
+ | </plugin> | ||
+ | </plugins> | ||
+ | </build> | ||
+ | </source> | ||
− | + | Run the goal with | |
+ | mvn jetty:run | ||
− | : | + | * [http://akhikhl.github.io/gretty-doc/Getting-started.html Gradle gretty] |
+ | * [https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-runner jetty-runner] | ||
+ | * [https://github.com/jsimone/webapp-runner webapp-runner (Tomcat) ] | ||
+ | |||
− | + | All jetty plugins (or runner) above can quickly start your project in an IDE in seconds without packaging a project as WAR. When you change a zul or a Java class, you don't need to restart the jetty server. It will hot-reload the newly-compiled class. So that you can view the result with your browser, just like Visual Editor can do. | |
− | |||
− | [ | + | <!-- |
+ | Since 2.0.0, Visual Editor is not part of ZK Studio. It now available as a separate Eclipse plugin to install. Please download it from [http://www.zkoss.org/download/zkstudio download page] and install it as a Eclipse plugin. The installation procedure is same as ZK Studio offline installation described in the above section. | ||
+ | --> | ||
− | = | + | = Troubleshooting = |
− | + | == Can't activate in Spring Tool Suite == | |
+ | Spring tool suite 2.6 and later may ask that encrypt/decrypt library must be signed by trusted source. So with STS, in order to activate ZK Studio you need to modify java.security file to enable the license management of ZK Studio, i.e. the Bouncy Castle Cryptography Provider. | ||
− | :2. | + | First you need to check your jvm version. For Ubuntu/Debian users, run |
+ | <source lang="text" > | ||
+ | $ update-java-alternatives –l | ||
+ | </source> | ||
+ | You should be seeing: | ||
+ | <source lang="text" > | ||
+ | java-6-sun 63 /usr/lib/jvm/java-6-sun | ||
+ | </source> | ||
+ | To get your Bouncy Castle running correctly: | ||
+ | *1.Search for java.security in /path_to_your_jvm/jre/lib/security | ||
+ | *2.Should look like: | ||
+ | <source lang="text" > | ||
+ | #...... | ||
+ | # (some info) | ||
+ | #...... | ||
+ | security.provider.1=sun.security.provider.Sun | ||
+ | security.provider.2=sun.security.rsa.SunRsaSign | ||
+ | security.provider.3=com.sun.net.ssl.internal.ssl.Provider | ||
+ | … | ||
+ | security.provider.8=sun.security.smartcardio.SunPCSC | ||
+ | </source> | ||
+ | *3.Add security.provider.X=org.bouncycastle.jce.provider.BouncyCastleProvider as the last provider. In the sample above you will add | ||
+ | <source lang="text" > | ||
+ | security.provider.9=org.bouncycastle.jce.provider.BouncyCastleProvider | ||
+ | </source> | ||
+ | *4. Visit Bouncy Castle (http://www.bouncycastle.org/latest_releases.html) and search for bcprov-jdkxx-xxx.jar according to your JVM version. Add it to /path_to_your_jvm/jre/lib/ext | ||
+ | *5.Remove any other undesired bcprov-jdkxx-xxx.jar from your class path. | ||
− | + | After you have successfully run the Bouncy Castle Cryptography Provider you should be able to activate ZK Studio. If there is still an issue please contact info@zkoss.org for further assistance. | |
− | + | == WTP not installed == | |
− | + | If you get the following error message while installing ZK Studio, that means you are not using Eclipse for JavaEE Developers, and you need to install [http://www.eclipse.org/webtools Eclipse WTP] plug-in manually or download Eclipse for JavaEE Developers. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | If you get the following error message while installing ZK Studio, that means you are not using Eclipse for | ||
<pre> | <pre> | ||
Line 145: | Line 175: | ||
</pre> | </pre> | ||
− | == | + | ==Still have problem?== |
− | + | Please contact [mailto:info@zkoss.org info@zkoss.org] if there's any issue after referencing the above note. | |
+ | |||
+ | |||
+ | |||
+ | {{ZKStudioEssentialsPageFooter}} |
Latest revision as of 13:23, 19 January 2022
Prerequisite
There are some software you need to install before installing ZK Studio.
Java SE Development Kit (JDK)
Java version 6 or later is required in order to run Eclipse with ZK Studio, you can download it from Oracle official site.
Eclipse IDE for Java EE Developers
ZK Studio is an Eclipse Plug-in, therefore you must install Eclipse. We recommend the Eclipse IDE for Java EE Developers package.
Install:
Installation is done simply by extracting the downloaded zip file to a proper local folder. To make sure Eclipse can run on your system, execute eclipse.exe
(in Windows) or eclipse
(in Unix or Linux). You can locate these files in your extracted eclipse folder.
Tips:
- We recommend modifying some parameters in the configuration file
eclipse.ini
which will result in performance gain, please refer here and here. - We also recommend setting Eclipse's default JRE to JDK, please refer to the "Setup/Preferences" section in WTP Tutorials – Building and Running a Web Application.
Application Servers
Before developing web applications in Java using ZK Framework, you need to install an application server. Apache Tomcat is one of the most popular web containers. Tomcat versions 6 and 7 are supported and can be downloaded at Apache Tomcat.
Install:
- Download the zip file of Tomcat distribution and extract it to a proper location (with no illegal characters or space in the path). Tomcat requires configuration before it can be used with Eclipse, this process is described in the following link Running the ZK Project.
Tips:
- If you not only want to develop web applications, but also need to deploy them on Apache Tomcat, links to the official installation instructions for directly running Apache Tomcat in your environment are provided below:
Install ZK Studio
ZK Studio can be installed in several ways. We recommend to install through Marketplace.
Marketplace (Since Eclipse 3.6)
Marketplace is the easiest way to install plugins. Go to menu [Help] > [Eclipse Markpetplace] and search "zk studio" you'll find ZK Studio to install.
Update Site
- Open Eclipse, click the [Help] menu and select [Install New Software...]. A install window will popup, and then click Add
- Name the site as "ZK Studio" and copy corresponding update site's URL into Location field and click OK.
- The URL of ZK Studio for Eclipse 4.2 and later: http://studio.zkoss.org/resource/plugins/eclipse_4_2
- The URL of ZK Studio for Eclipse 3.7: http://studio.zkoss.org/resource/plugins/eclipse_3_7
- Expand the update entry of ZK Studio, check ZK Studio and then click Next
- The Eclipse Installation System will now attempt to retrieve information from the update site. This will take some time depending on your eclipse environment, please be patient.
- Click Next on the pop-up install wizard dialog.
- Check "I accept the terms of the license agrement" and click Finish on the wizard dialog.
- The Installation process will now begin.
- If there is a pop-up dialog with unsigned content warning, please click OK to continue.
- Once the installation is complete, please restart Eclipse as prompted.
Offline Installation
- Download the offline installation zip file from ZK Studio download page.
- The step is the same as step 1 we do for Update Site. Open Eclipse, click [Help] menu and select [Install New Software...]. An install window will popup, click Add
- Click Archive... to open a file explorer. Then, use file explorer to choose downloaded file and click "OK" to install.
Activate ZK Studio
Removed since ZK Studio 2.0.4.
ZK Studio 2.0.4 and later doesn't require activation.
Visual Editor
Visual Editor is a deprecated feature, it is no longer included in ZK Studio. There are several alternatives:
- install run jetty run plugin for eclipse
- jetty Maven plugin
Add the plugin below in a pom.xml.
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.8.v20171121</version>
<configuration>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
<allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
</webAppConfig>
<scanIntervalSeconds>5</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
Run the goal with
mvn jetty:run
All jetty plugins (or runner) above can quickly start your project in an IDE in seconds without packaging a project as WAR. When you change a zul or a Java class, you don't need to restart the jetty server. It will hot-reload the newly-compiled class. So that you can view the result with your browser, just like Visual Editor can do.
Troubleshooting
Can't activate in Spring Tool Suite
Spring tool suite 2.6 and later may ask that encrypt/decrypt library must be signed by trusted source. So with STS, in order to activate ZK Studio you need to modify java.security file to enable the license management of ZK Studio, i.e. the Bouncy Castle Cryptography Provider.
First you need to check your jvm version. For Ubuntu/Debian users, run
$ update-java-alternatives –l
You should be seeing:
java-6-sun 63 /usr/lib/jvm/java-6-sun
To get your Bouncy Castle running correctly:
- 1.Search for java.security in /path_to_your_jvm/jre/lib/security
- 2.Should look like:
#......
# (some info)
#......
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
…
security.provider.8=sun.security.smartcardio.SunPCSC
- 3.Add security.provider.X=org.bouncycastle.jce.provider.BouncyCastleProvider as the last provider. In the sample above you will add
security.provider.9=org.bouncycastle.jce.provider.BouncyCastleProvider
- 4. Visit Bouncy Castle (http://www.bouncycastle.org/latest_releases.html) and search for bcprov-jdkxx-xxx.jar according to your JVM version. Add it to /path_to_your_jvm/jre/lib/ext
- 5.Remove any other undesired bcprov-jdkxx-xxx.jar from your class path.
After you have successfully run the Bouncy Castle Cryptography Provider you should be able to activate ZK Studio. If there is still an issue please contact info@zkoss.org for further assistance.
WTP not installed
If you get the following error message while installing ZK Studio, that means you are not using Eclipse for JavaEE Developers, and you need to install Eclipse WTP plug-in manually or download Eclipse for JavaEE Developers.
Cannot complete the install because one or more required items could not be found. Software currently installed: ZK Studio Eclipse Plugins 0.9.6.v200912041237 (org.zkoss.eclipse.feature.group 0.9.6.v200912041237) Missing requirement: ZK Studio Storage Plug-in 0.9.6.v200912041237 (org.zkoss.eclipse.zks 0.9.6.v200912041237) requires 'bundle org.eclipse.wst.common.project.facet.ui 0.0.0' but it could not be found Cannot satisfy dependency: From: ZK Studio Eclipse Plugins 0.9.6.v200912041237 (org.zkoss.eclipse.feature.group 0.9.6.v200912041237) To: org.zkoss.eclipse.ve [0.9.6.v200912041237] Cannot satisfy dependency: From: ZK Studio Visual Editor Plug-in 0.9.6.v200912041237 (org.zkoss.eclipse.ve 0.9.6.v200912041237) To: bundle org.zkoss.eclipse.zks 0.0.0
Still have problem?
Please contact info@zkoss.org if there's any issue after referencing the above note.