“libprism_sw.dylib” cannot be opened because the developer cannot be verified. on mac JAVAFX

Viewed 5746

I use eclipse and when I run my program it says this

"libprism_sw.dylib” cannot be opened because the developer cannot be verified. and “libprism_es2.dylib” cannot be opened because the developer cannot be verified.

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;

    public class try1 extends  Application {
        public void start(Stage arg0) {
            // TODO Auto-generated method stub\
            Image[] array = { new Image("Screen Shot 2020-12-19 at 9.07.20 AM"),
                    new Image("Screen Shot 2021-02-25 at 10.47.43 AM") };
            int n = (int) (Math.random() * 4);
            Pane pane = new Pane();
            ImageView imgv = new ImageView(array[n]);
            pane.getChildren().add(imgv);
            Scene scene = new Scene(pane);
            arg0.setScene(scene);
            arg0.show();
        }
        public static void main(String[] args) {
            // TODO Auto-generated method stub\
            lanuch(args);
        }
        private static void lanuch(String[] args) {
            // TODO Auto-generated method stub
            
        }
    }

Any solutions?

2 Answers

The same thing happened to me after I forgot that I moved the location of my javafx libraries, but forgot to update it in the IDE. I downloaded them again and extracted them to a folder from the archive. Went through the JavaFX "activation" and still wouldn't work.

I fixed it by going to Settings > Security & Privacy > General and allowing the libraries to be accessed despite the fact that they couldn't be verified (unidentified developer).

You will see the .dylib file listed under the "Allow apps downloaded from:" section. I authorized it and a few more files that required permission, and voila! Problem solved.

This enables to run apps from anywhere (useful if you want to avoid checking case by case, but need to be careful from where you download your software):

Type this in Terminal (located in /Applications/Utilities).

sudo spctl --master-disable

Then check in System Preferences>Security and Privacy>Allow apps downloaded from, and check that the "Anywhere" option is there and selected.

https://discussions.apple.com/thread/7737371

Related