im working with eclipse indigo, i created 2-3 work spaces and all are working fine, last day i was making a new work space same as i created before, but when i tried to start tomcat server or maven build to my project im getting the following error "Error: Could not find or load main class JDK"
i went to Window --> Preferences --> Java --> Installed JREs
and checked the setting of JDK and JRE but still having the same error with both JDK/JRE. also my old work spaces are working fine with same settings. i also checked the environmental variable for Java home and that is pointing to the same location where Java is installed.
Can any one help me to find out the issue. Thanks in advance.
I went to environmental variable and get the location of JDK_HOME, then run the command prompt and went to the JDK_HOME location, There i run the following script
unpack200 -r -v -l tools.pack tools.jar
and everything worked fine. hope this will help someone. Thanks.
Java classpath may not set correctly.
On Linux OS,
Method 1: Set the right environment variable CLASSPATH
.
echo "export CLASSPATH=$CLASSPATH:." >> /etc/profile
Method 2: Add " -classpath . "
to the java command
For example,
java -classpath . Test.class
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.