[精讚] [會員登入]
1262

更新程式環境到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

你可能感興趣的文章

縣市端新增師生關係API程式 在縣市端建立可由教育部主機撈取縣市資料庫師生關係的API 程式

系統不正常關機導致mongodb啟動失敗 重新安裝mongodb使用mongorestore

solution for selinux issue while installing zabbix agent on centos7 install zabbix agent as service will raise selinux issue on some centos 7.3.1611

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

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

縣市端IdP新增自訂首頁內容功能 合併本部主程式,手動於mongo內新增管理使用者資料

我有話要說

>>

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

訪客留言

[無留言]

隨機好文

[NetBeans]如何從git下載專案改建為自己的專案 修改git專案

IIS10設定url rewrite to https if you setup url rewrite function in IIS10, might cause api callback failed

intellij IDEA git設定說明 whenever using git push fuction in the intellij IDEA

zfs on ubuntu 20.04 how to destroy zfs pool while error message said pool is busy

啟動chrome時要求須輸入密碼enter password to unlock login keyring asking for entering password to unlock login kerying on Ubuntu desktop