sql >> データベース >  >> RDS >> Oracle

JavaFXTextAreaの即時更新

    executeCmds()を実行します バックグラウンドスレッドでメソッドを実行し、Platform.runLater()を使用してテキスト領域を更新します :

    public void executeCmds(){
        Thread thread = new Thread(() -> {
            createTempDirectory();
            copyConfigPropetiesFileValues();
            copyConfigProperties();
            copyYMLFile();
            copyYMLFileProperties();
    
            stopTomcatServer();
    
            deleteOldWar();
            copyNewWar();
            startTomcatServer();
    
            copyOldConfigFile();
            copyOldYMLFile();
        });
        thread.start();
    }
    

    そして

    public void createTempDirectory(){
             //Creating temporary directory for copying property files
        updateStatus("Trying to create a temp directory \n");
        File tempDir= new File(tomcat_path.getText()+filePath.path_to_temp_directory);
        if(!tempDir.exists())
            tempDir.mkdirs();
    
        updateStatus("Created Temp directory to copy Config Files \n");
    }
    
    // similarly for other methods
    
    private void updateStatus(String message) {
        if (Platform.isFxApplicationThread()) {
            status_text_area.appendText(message);
        } else {
            Platform.runLater(() -> status_text_area.appendText(message));
        }
    }
    


    1. エコーされた変数を変更するHTMLフォームですが、データベースは変更しませんか?

    2. 新しいSQLAlchemyオブジェクトのUUID主キーが同じ値で作成されないようにする方法

    3. php日時をmysqlデータベースに保存します

    4. 過去24時間で最も人気のあるPHPMySQLクエリ