[精讚] [會員登入]
1185

更新程式環境到wildfly18+openjdk11-phase2: update IDEA to jdk11

更新IDEA 編譯環境

分享此文連結 //n.sfs.tw/14516

分享連結 更新程式環境到wildfly18+openjdk11-phase2: update IDEA to jdk11@外行中的外行
(文章歡迎轉載,務必尊重版權註明連結來源)
2020-04-11 22:25:08 最後編修
2020-02-06 23:42:30 By jung
 

除了系統更新,要先確認IDEA環境更新為openjdk11,才能使用jdk11 的函式庫

1.先到 https://adoptopenjdk.net 下載最新版的openjdk11openJ9

tar解壓縮後,進到IDEA就可以指定要使用的版本,跟本機的JAVA版本可以不同

如果是MAC OS還要到系統設定System Preference開啟允許adoptopenjdk

在Project Structure->SDKs可用+指定jdk目錄位置

 2. 在IDEA指定Project SDK = openjdk11, Project Language Level = 8-Lambdas

因為程式寫法尚未全部更換為java 11

然後每個Modules的 Language Level也維持8-Lambdas

3.重新匯入gitlab主機的憑證給IDEA認證

3-1:

keytool -importcert -storepass changeit -trustcacerts -alias TWCAROOT -file root.cer -noprompt

3-2:

keytool -importcert -storepass changeit -trustcacerts -alias TWCAUCA -file uca.cer -noprompt

為了可以自動更新 repositories,一定要做這件事,否則POM會有錯誤

在idea的Preferences->Build,Execution,Deployment->選擇Repositories,點選URL就可以手動再Update

 

4. Merge tc-idp-wicket8分支:這邊基本上會正常完成,主要是POM dependencies 相依函示庫的更新

合併完成後,須將這個相依先註解,否則編譯時會找不到這個函式庫

<!-- Test for accountdatasource
<dependency>
    <groupId>info.sls</groupId>
    <artifactId>tcaccountdatasource</artifactId>
    <version>0.0.3</version>
</dependency>
-->

5. 本地xxauth更新:這裡會遇到org.apache.commons.configuration這個套件已經不支援jdk11

5-1:引入org.apache.commons.configuration2

5-2:在xxscopes.java這支程式需要修改

try {
            File propertiesFile = new File(EduTool.BASE_PROP_DIR.concat("xxscopes.properties"));
//要將xxscopes.properties檔案放到idp host /opt/settings目錄下

            logger.info("MongoDB sysconfig.properties : {}", propertiesFile.exists());
            Parameters parameters = new Parameters();
            ReloadingFileBasedConfigurationBuilder<FileBasedConfiguration> builder =
                    new ReloadingFileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration.class)
                            .configure(parameters.fileBased()
                                    .setListDelimiterHandler(new DefaultListDelimiterHandler(','))
                                    .setFile(propertiesFile)
                            );
            PeriodicReloadingTrigger trigger = new PeriodicReloadingTrigger(builder.getReloadingController(),
                    null, 1, TimeUnit.MINUTES);
            trigger.start();
            Configuration properties = builder.getConfiguration();
            Iterator<String> it = properties.getKeys();
            while (it.hasNext()) {
                String key = it.next();
                ASMapping.put(key, properties.getString(key, ""));
            }
        } catch (ConfigurationException ex) {
            logger.error(ex.getLocalizedMessage());
        }

---未完待續

 

END

你可能感興趣的文章

新增縣市端回傳使用者資料功能 新增縣市端回傳使用者資料功能

新增IDP程式使用google防機器人的驗證功能 身份認證程式新增google防機器人v2

更新IDP程式以新增及修正本地管理帳號登入 add locallogin page and function with local authorized account

更新程式環境到wildfly18+openjdk11-phase3: 伺服器環境升級準備 upgrade jdk and wildfly on server

更新程式取消google recaptcha改用輸入驗證碼 update cnclibs to 0.0.8.6

縣市IDP更換SSL憑證及修改servername+wildfly等設定 縣市IDP更換SSL

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

centos7 apache ssl.conf設定狀況 在apache更新或重啟後可能遇到ssl.conf衝突問題

安裝netbeans9遇到的小狀況 how to show netbeans9 program onto ubuntu desktop

proxmox5.x using duplicati as cloud backup strategy install duplicati program on Proxmox host for remote backup using google drive account

determine strings that include numbers and spaces differ from Highest and Lowest numbers inside strings that includes spaces

macbook pro 2019翻蓋就開機問題 macbook automatically boot itself while lifting screen up