Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-ui-dev] Javax.comm problem with Plug-in Development

Hi ~


I meet a problem, I have searched on the web, found someone have same problems as me, but cannot find answer. I am developing plug-in tool. Now I need to add a function to access serial port, so I installed Javax.comm jar. I am sure I put the right file into right locations, because I tried a simple code for list local ports as JAVA application, it works fine! But when I try to immigrate into my plug-in project, errors came out:

Access restriction: The method getPortIdentifiers() from the type CommPortIdentifier is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\ext\comm.jar


My simple function code:


import javax.comm.*;  


import java.util.Enumeration;  


public class ListAvailablePorts {  


    public void list() {  

        Enumeration ports = CommPortIdentifier.getPortIdentifiers();  






    public static void main(String[] args) {  

        new ListAvailablePorts().list();  




If I am right, I think it should be somewhere to change of project settings, could someone help me with this? I am new to plug-in development.


Thanks in advance





Back to the top