gudii9
asked on
web service creation error
Hi,
I created dynamic web project with name WebServiceTest. I created java class as below
public class Addition{
public String AddtionMethod(int x,int y){
return "Addition of "+x+" and "+y+" is "+(x+y);
}
}
I right clicked on the WebServiceTest -->File-->New--->Other---> Web Service --->Web Service(not the other Web Service Client)
I am getting below error.
The workbench is running on Java VM version 1.6, however, the compiler compliance level of the project "AdditionWebService" is set to Java version 1.7. Generation of a Web service from Java cannot proceed because the tools will be unable to process the class file compiled within the project. To correct the problem, take one of the following actions:
1. Open project properties, select Project Facets, and use Add/Remove Project Facet to change Java version to 1.6 or lower.
2. Restart the workbench on a version 1.7 Java VM.
what is the exact meaning, cause for this error.
how to fix this error.
I do not want my other projects affected by the fix or change t the project facet java version.
While creating java project or dynamic web project javaSE by default getting selected as 1.7 in the dropdown. When i change it 1.6 it shows warning as shown in the attachemnt. How to change default compiler compliance level for current workspace itself rather than doing for each project while creation or after creation right clicking on the project -->properties--java facets-->change to 1.6 everytime.
Please advise.
Any links resources ideas highly appreciated. Thanks in advance
CompilerComplianceLEvel.jpg
I created dynamic web project with name WebServiceTest. I created java class as below
public class Addition{
public String AddtionMethod(int x,int y){
return "Addition of "+x+" and "+y+" is "+(x+y);
}
}
I right clicked on the WebServiceTest -->File-->New--->Other--->
I am getting below error.
The workbench is running on Java VM version 1.6, however, the compiler compliance level of the project "AdditionWebService" is set to Java version 1.7. Generation of a Web service from Java cannot proceed because the tools will be unable to process the class file compiled within the project. To correct the problem, take one of the following actions:
1. Open project properties, select Project Facets, and use Add/Remove Project Facet to change Java version to 1.6 or lower.
2. Restart the workbench on a version 1.7 Java VM.
what is the exact meaning, cause for this error.
how to fix this error.
I do not want my other projects affected by the fix or change t the project facet java version.
While creating java project or dynamic web project javaSE by default getting selected as 1.7 in the dropdown. When i change it 1.6 it shows warning as shown in the attachemnt. How to change default compiler compliance level for current workspace itself rather than doing for each project while creation or after creation right clicking on the project -->properties--java facets-->change to 1.6 everytime.
Please advise.
Any links resources ideas highly appreciated. Thanks in advance
CompilerComplianceLEvel.jpg
ASKER
>>>As for changing the default workspace compliance level, go to Window -> Preferences and then in the filter text box type in "compliance" and you should now only have a couple of options filtered for you. Go to Java -> Compiler and there you will see the compliance setting, change this to 1.6
How to change at global eclipse level to 1.6 so that all projects by default take 1.6 and then i do not have to always do above step for each and every project. please advise
How to change at global eclipse level to 1.6 so that all projects by default take 1.6 and then i do not have to always do above step for each and every project. please advise
The above post WAS to change the global setting!
ASKER
>>>1. Open project properties, select Project Facets, and use Add/Remove Project Facet to change Java version to 1.6 or lower.
2. Restart the workbench on a version 1.7 Java VM.
when we right click on specific project does it change only for that specific project or wil it effect all the projects in workspace. please advise
2. Restart the workbench on a version 1.7 Java VM.
when we right click on specific project does it change only for that specific project or wil it effect all the projects in workspace. please advise
when we right click on specific project does it change only for that specific projectDoes "what" change? Are we talking now about the compliance level or the project facets, or something else.
But note, *some* settings in Eclipse can have a default setting or a project-specific setting. If it is left as the default setting, then it will take the value from the global workspace settings, and so if this global value changes, the effective value in the project will also change. But it the project setting has been altered in anyway, then it is now a "project-specific" setting and any changes to the global workspace setting will no longer have any effect. This is the case even if the project-specific setting happens to have the same value as the default setting, it will still NOT change from the project specific setting value.
ASKER
I mean compliance level. please advise
>>>But note, *some* settings in Eclipse can have a default setting or a project-specific setting.
where to get this list of which setting can have default or project specific setting?
>>> But it the project setting has been altered in anyway, then it is now a "project-specific" setting and any changes to the global workspace setting will no longer have any effect
I am bit confused between eclipse global settings, project specific setttings, default settings
>>>But note, *some* settings in Eclipse can have a default setting or a project-specific setting.
where to get this list of which setting can have default or project specific setting?
>>> But it the project setting has been altered in anyway, then it is now a "project-specific" setting and any changes to the global workspace setting will no longer have any effect
I am bit confused between eclipse global settings, project specific setttings, default settings
ASKER
Please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As for changing the default workspace compliance level, go to Window -> Preferences and then in the filter text box type in "compliance" and you should now only have a couple of options filtered for you. Go to Java -> Compiler and there you will see the compliance setting, change this to 1.6