X Tutup
Skip to content

Commit 5863d93

Browse files
committed
📝 Writing docs.
1 parent 79d4d98 commit 5863d93

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/appendix/jdk8-upgrade.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,39 @@ Caused by: java.io.IOException: invalid constant type: 15
153153
154154
http://asm.ow2.org/history.html
155155

156+
### Java连接redis启动报错Error redis clients jedis HostAndPort cant resolve localhost address
157+
158+
错误环境:
159+
本地window开发环境没有问题。上到Linux环境,启动出现问题。
160+
错误信息:
161+
Error redis clients jedis HostAndPort cant resolve localhost address
162+
163+
解决办法:
164+
165+
1. 查看Linux系统的主机名
166+
167+
```
168+
# hostname
169+
template
170+
```
171+
172+
2. 查看/etc/hosts文件中是否有127.0.0.1对应主机名,如果没有则添加
173+
174+
### Resin 容器指定 JDK 1.8
175+
176+
如果 resin 容器原来版本低于 JDK1.8,运行 JDK 1.8 编译的 web app 时,可能会提示错误:
177+
178+
```
179+
java.lang.UnsupportedClassVersionError: PR/Sort : Unsupported major.minor version 52.0
180+
```
181+
182+
解决方法就是,使用 JDK 1.8 要重新编译一下。然后,我在部署时出现过编译后仍报错的情况,重启一下服务器后,问题解决,不知是什么原因。
183+
184+
```
185+
./configure --prefix=/usr/local/resin --with-java=/usr/local/jdk1.8.0_121
186+
make & make install
187+
```
188+
156189
## 资料
157190

158191
- [Compatibility Guide for JDK 8](http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html)

0 commit comments

Comments
 (0)
X Tutup