I uploaded a couple of pictures in my database and i want to get their path, but i always get something like this: com.mysql.cj.jdbc.Blob@28763983
for every picture. This is the code:
public static List<Image> selectImages() {
ResultSet rs = null;
try {
imageList.clear();
String selectImages = "select * from image";
PreparedStatement ps = DataBaseConnection.get().prepareStatement(selectImages);
rs = ps.executeQuery(selectImages);
while (rs.next()) {
int idImage = rs.getInt("id");
Blob viewImage = rs.getBlob("image");
Image image = new Image(idImage, viewImage);
imageList.add(image);
}
return imageList;
How can i get a real path instead of that gibberish?