Permission denied when copying a DLL

275

Solution 1

Try taking ownership of the file.

Have a look at this guide

Solution 2

Try Unlocker.

If you've ever been unable to delete a file in Windows, and can't figure out what program's using it, Unlocker is the solution.

Share:
275

Related videos on Youtube

MSB
Author by

MSB

Updated on September 18, 2022

Comments

  • MSB
    MSB almost 2 years

    I'm having trouble with the setMaximized() method on OSX,

    When I invoke it:

    Scene scene = new Scene(debug);
    
            stage.setOnCloseRequest(event -> System.exit(0));
            stage.setScene(scene);
    
            stage.setMaximized(true);
            stage.show();
    

    The app window vanishes. For clarification I am trying to run the app from Eclipse on OSX 10.9.5. The same logic seems to work fine on Windows. Are there any known issues that could cause this? I don't really want to go into writing platform specific implementations of my window.

    EDIT: Here is the entire class:

    public class Main extends Application {
        /** Pane that is used for outputting debug information about touch interactions and user interface elements. */
        private DebugParent debug;
    
        private Control customPane;
    
        private Stage stage;
    
        @Override
        public void start(Stage stage) throws Exception {
            Font.loadFont(this.getClass().getResourceAsStream("/ui/fonts/titillium.otf"), 20);
    
            customPane = FXMLLoader.load(this.getClass().getResource("/ui/Main.fxml"), null, new CustomBuilderFactory());
    
            customPane.dragProcessingModeProperty().set(EventProcessingMode.HANDLER);
    
            // Init Debug
            debug = new DebugParent(customPane);
            debug.registerCustomPane(customPane);
            debug.setOverlayVisible(false);
    
            // Init menu
            ContextMenu menu = new MainMenu(catalog, customPane);
            customPane.setContextMenu(menu);
    
            // Init scene
            Scene scene = new Scene(debug);
    
            this.stage = stage;
            this.stage.setOnCloseRequest(event -> System.exit(0));
            this.stage.setScene(scene);
    
            this.stage.setMaximized(true);
            this.stage.show();
    
            this.stage.addEventHandler(KeyEvent.KEY_PRESSED, this::handleKey);
    
            // Invalidate
            customPane.invalidate();
            customPane.requestFocus();
        }
    
        private void handleKey(KeyEvent keyEvent) {
            switch (keyEvent.getCode()) {
                case F10: stage.setMaximized(!stage.isMaximized()); break;
                case F11: stage.setFullScreen(!stage.isFullScreen()); break;
            }
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    }
    

    Notably I've found that attempting to enter actual fullscreen mode from here crashes Java altogether.

    2015-05-06 21:33:14.795 java[9119:507] *** Assertion failure in -[_NSWindowFullScreenTransition makeAndSetupOverlayWindow], /SourceCache/AppKit/AppKit-1265.21/AppKit.subproj/NSWindowFullScreenTransition.m:776
    2015-05-06 21:33:14.799 java[9119:507] An uncaught exception was raised
    2015-05-06 21:33:14.799 java[9119:507] Invalid parameter not satisfying: _transitionedWindowBeforeContents != nil
    2015-05-06 21:33:14.799 java[9119:507] (
        0   CoreFoundation                      0x00007fff909e125c __exceptionPreprocess + 172
        1   libobjc.A.dylib                     0x00007fff93d6be75 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff909e1038 +[NSException raise:format:arguments:] + 104
        3   Foundation                          0x00007fff949f43d1 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
        4   AppKit                              0x00007fff91425068 -[_NSFullScreenTransition makeAndSetupOverlayWindow] + 267
        5   AppKit                              0x00007fff90e4f060 -[_NSFullScreenTransition enterFullScreenTransitionWithOptions:animated:activatingIt:] + 933
        6   AppKit                              0x00007fff90e4e48e -[NSWindow _enterFullScreenMode:animating:activating:] + 291
        7   libglass.dylib                      0x00000001204d0c99 -[GlassViewDelegate enterFullscreenWithAnimate:withKeepRatio:withHideCursor:] + 153
        8   libglass.dylib                      0x00000001204cc606 Java_com_sun_glass_ui_mac_MacView__1enterFullscreen + 358
        9   ???                                 0x0000000109281954 0x0 + 4448590164
        10  ???                                 0x0000000109273420 0x0 + 4448531488
        11  ???                                 0x0000000109273420 0x0 + 4448531488
        12  ???                                 0x0000000109273c4d 0x0 + 4448533581
    )
    2015-05-06 21:33:14.800 java[9119:507] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: _transitionedWindowBeforeContents != nil'
    *** First throw call stack:
    (
        0   CoreFoundation                      0x00007fff909e125c __exceptionPreprocess + 172
        1   libobjc.A.dylib                     0x00007fff93d6be75 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff909e1038 +[NSException raise:format:arguments:] + 104
        3   Foundation                          0x00007fff949f43d1 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
        4   AppKit                              0x00007fff91425068 -[_NSFullScreenTransition makeAndSetupOverlayWindow] + 267
        5   AppKit                              0x00007fff90e4f060 -[_NSFullScreenTransition enterFullScreenTransitionWithOptions:animated:activatingIt:] + 933
        6   AppKit                              0x00007fff90e4e48e -[NSWindow _enterFullScreenMode:animating:activating:] + 291
        7   libglass.dylib                      0x00000001204d0c99 -[GlassViewDelegate enterFullscreenWithAnimate:withKeepRatio:withHideCursor:] + 153
        8   libglass.dylib                      0x00000001204cc606 Java_com_sun_glass_ui_mac_MacView__1enterFullscreen + 358
        9   ???                                 0x0000000109281954 0x0 + 4448590164
        10  ???                                 0x0000000109273420 0x0 + 4448531488
        11  ???                                 0x0000000109273420 0x0 + 4448531488
        12  ???                                 0x0000000109273c4d 0x0 + 4448533581
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    

    By the looks of it JavaFX is not playing nice with OSX animations.

    • avirk
      avirk about 13 years
      Try in safe mode or if u are an admin than go through that account.
    • Werner Henze
      Werner Henze almost 11 years
      Does Windows deny reading the DLL to copy or does Windows deny writing the DLL to the location where you want to copy it? Are you overwriting an existing DLL?
    • James_D
      James_D about 9 years
      Can you create a complete executable example? This worked fine for me when I tested it (OS X 10.9.5, JDK 1.8.0_40).
    • ItachiUchiha
      ItachiUchiha about 9 years
      Works fine on OS X 10.8.5 with JDK 1.8.0_25.
    • MSB
      MSB about 9 years
      The app is a little complicated since it relies on custom components, will try to make a more complete executable example. It's good to know that it's most likely not a problem in the API.