Creating war from jar in command prompt: In order to create the war file, you need to have the jar file first. Then go to project location say, C -> Apache software foundation -> Apache Tomcat -> Webapps -> Guru (consider guru is the project now and we need to create the war file for the same). Go the above location in the command prompt and type the "jar -cvf guru.war *". Please ensure that you have created the jar file in the above location. Don not forget to type the asterisk followed by guru.war. Creating jar file: you can create the jar file in any of the below ways, 1. Using eclipse Just right click on the project and type export -> jar and save. 2. Using the command: jar cf jarfilename.jar inputclass.class jar cf guru.jar guru.class
Problem: Solution: [sociallocker] Configure the server in the eclipse. go to windows -> show view -> servers then add the new wizard server. Now go to xampp control panel and start the apache and try. If it does not then change the port number of tomcat server in the eclipse by double clicking it and try again [/sociallocker] If still problem exists, then better download the new xampp and try. Thanks for reading this post......!!!
Reason: In the path setting, instead of jdk, jre may be set. Solution: Please ensure the ant path like below, set ANT_HOME=D:\apache-ant-1.8.4 set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0 set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin
Solution 1: Go to windows -> preferences, and go to Installed JRE's and change the Default Vm arguments value as like follows, Default Vm Arguments: -XX:-UseSplitVerifier Now you will not get the error. Solution 2: Go to windows -> preferences -> Java -> Compiler and change it to jdk 1.6 now also you will not get the same error. you can take any solution based on your need. Thanks for reading this post............!!!
Eclipse error: Reason for the above error: Both eclipse and java bit may not be same. Eg: eclipse (32bit) and java(64bit) or eclipse(64bit) and java(32bit). Solution: Match the eclipse bit(32bit) and java(32bit) or eclipse bit(64bit) and java(64bit). How to check whether eclipse is 32bit or 64bit ? Just go to eclipse configuration file and see the line below like this, eclipse.ini plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813 this is 32bit eclipse. Download the eclipse and java from the official below sites with same bit(32 bit) or (64bit) Eclipse download: Java download: Ensure the path should be like this, Java_Home: C:\Program Files\Java\jdk1.6.0 CLASSPATH: C:\Program Files\Java\jdk1.6.0\jre\li