import java.sql not working on visual code
inside visual studio in my javafx project when I use import java.sql after sql I put .* or any other package name it's been red underlined and said the package java.sql is not accessible! all others are work fine and I used starter code for making javafx project. like below : package com.example.pouya; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; import java.io.*; import java.sql.Connection; /** * JavaFX App */ public class App extends Application { private static Scene scene; @Override public void start(Stage stage) throws IOException { scene = new Scene(loadFXML("primary"), 640, 480); stage.setScene(scene); stage.setTitle("Drug Management"); stage.show(); } static void setRoot(String fxml) throws IOException { scene.setRoot(loadFXML(fxml)); } private static Parent loadFXML(String fxml) throws IOException { FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml")); return fxmlLoader.load(); } public static void main(String[] args) { launch(); } } I also used import java.sql.*; but I get same error
inside visual studio in my javafx project when I use import java.sql after sql I put .* or any other package name it's been red underlined and said the package java.sql is not accessible! all others are work fine and I used starter code for making javafx project. like below :
package com.example.pouya;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.*;
import java.sql.Connection;
/**
* JavaFX App
*/
public class App extends Application {
private static Scene scene;
@Override
public void start(Stage stage) throws IOException {
scene = new Scene(loadFXML("primary"), 640, 480);
stage.setScene(scene);
stage.setTitle("Drug Management");
stage.show();
}
static void setRoot(String fxml) throws IOException {
scene.setRoot(loadFXML(fxml));
}
private static Parent loadFXML(String fxml) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml"));
return fxmlLoader.load();
}
public static void main(String[] args) {
launch();
}
}
I also used import java.sql.*; but I get same error