u/Meun3D

Java import is not working in VSCode

I have this problem for so long time now. I am studying computer Sience and we got a .jar file from our lecturer and we have to work with it. Usually we are using Eclipse in class, but I love using VSCode and it won't work there. A fellow student is also using VSCode and it works. I tried everything, but nothing works. Not even my lecturer knows how to fix this issue.

We have to use Java for this task and need to import some Classes from the .jar file the lecturer gave us. So I added it into the Referenced Libraries. It still can't find the File apparently.

The Issue says "The import de.vitbund.netmaze.connector.Ibot cannot be resolved Source: VitNetMaze.jar"

The Github Copilot Chat also does not know the answer. Every time he says I fix it, but he changed nothing.

This is very odd, because the autocomplete feature is finding all the methods from the .jar. So it is finding it kind of?

The same project is working fine in Eclipse, so I thougt this must be a VSCode problem right?

If there are some Java programmes using VSCode please help me!!!

I' m not sure if this subreddit is the right place to ask this question. If someone knows a better subreddit to post this one would help me too.

package bot;


import de.vitbund.netmaze.connector.Action;
import de.vitbund.netmaze.info.GameEndInfo;
import de.vitbund.netmaze.info.GameInfo;
import de.vitbund.netmaze.info.RoundInfo;
import de.vitbund.netmaze.connector.IBot;


public class MinimalBot implements IBot {


    u/Override
    public String getName() {
        // TODO Auto-generated method stub
        return null;
    }


    u/Override
    public void onError(Exception arg0) {
        // TODO Auto-generated method stub
        
    }


    u/Override
    public void onGameEnd(GameEndInfo arg0) {
        // TODO Auto-generated method stub
        
    }


    u/Override
    public void onGameStart(GameInfo arg0) {
        // TODO Auto-generated method stub
        
    }


     bot;


import de.vitbund.netmaze.connector.Action;
import de.vitbund.netmaze.info.GameEndInfo;
import de.vitbund.netmaze.info.GameInfo;
import de.vitbund.netmaze.info.RoundInfo;
import de.vitbund.netmaze.connector.IBot;


public class MinimalBot implements IBot {


    u/Override
    public String getName() {
        // TODO Auto-generated method stub
        return null;
    }


    u/Override
    public void onError(Exception arg0) {
        // TODO Auto-generated method stub
        
    }


    u/Override
    public void onGameEnd(GameEndInfo arg0) {
        // TODO Auto-generated method stub
        
    }


    u/Override
    public void onGameStart(GameInfo arg0) {
        // TODO Auto-generated method stub
        
    }


    u/Override
    public Action onNewRound(RoundInfo arg0) {
        // TODO Auto-generated method stub
        return null;
    }


}
    public Action onNewRound(RoundInfo arg0) {
        // TODO Auto-generated method stub
        return null;
    }


}
reddit.com
u/Meun3D — 6 hours ago