Errors and solutions

Command to create war file in command prompt in java

Errors and solutions
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

Tomcat Started/stopped with errors, return code:1 Make sure you have java jdk or jre installed and the required ports are free

Errors and solutions
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......!!!

java.lang.VerifyError: Expecting a stackmap frame at branch target

Errors and solutions
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............!!!

Failed to load JNI shared library

Errors and solutions
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