Vivado - 将ISE设计导入Vivado会导致Java错误:“java.lang.NumberFormatException:对于输入字符串:”0,8“

描述

将ISE设计导入Vivado Design Suite时会发生以下类型的错误:

8/10/12 4:58:27 PM
java.lang.NumberFormatException:对于输入字符串:“0,8”
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)

在java.lan g.Float.parseFloat(Float.java:452)
at ui.views.yzcIG(SourceFile:1001)
at ui.views.yWdKh(SourceFile:2138)

at ui.views.IadKh(SourceFile:1351)
at ui.views.dhabaKq(SourceFile:20)
at ui.frmwork.a.dHp(SourceFile:55)
在ui.hOsu(SourceFile:555)
在ui.hOcTW(SourceFile:548)
at ui.views.yzcTW(SourceFile:1396)
at ui.views.yWcTW(SourceFile:2583)
at ui.views.Iac(SourceFile:924)
at ui.views.Izb(SourceFile:77)
at ui.views.Izc(SourceFile:1210)
at ui.views.Iqf(SourceFile:1547)
在com.jidesoft.document.DocumentComponent.dS(未知来源)
在com.jidesoft.document.DocumentPane.h(未知来源)
在com.jidesoft.document.DocumentPane.b(未知来源)
在com.jidesoft.document.DocumentPane.bx(未知来源)
在com.jidesoft.document.DocumentPane $ DocumentPaneLayoutPersistence.a(未知来源)
在com.jidesoft.swing.AbstractLayoutPersistence.fe(未知来源)
at ui.views.a.egI(SourceFile:268)
at ui.views.bA.egI(SourceFile:345)
at ui.views.u.ehx(SourceFile:918)
at ui.views.ur(SourceFile:839)
at ui.views.EYL(SourceFile:680)
at ui.views.EYy(SourceFile:641)
at ui.views.E.ar.t(SourceFile:48)
at ui.views.E.ap.D(SourceFile:304)
at ui.views.E.ap.a(SourceFile:240)
在ui.frmwork.ae.d(SourceFile:35)
at ui.frmwork.HTclEventBroker.a(SourceFile:223)
在ui.frmwork.ac.run(SourceFile:298)
在java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
at java.awt.EventQueue.access $ 000(EventQueue.java:101)
at java.awt.EventQueue $ 3.run(EventQueue.java:666)
at java.awt.EventQueue $ 3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain $ 1.doIntersectionPrivilege(ProtectionDomain.java:76)
在java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
at ui.frmwork.v.dispatchEvent(SourceFile:73)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

如果正在使用的计算机的区域设置设置为使用逗号而不是句点(句点)来描述小数位的语言,则会发生此错误。在上面的示例中,区域和语言设置设置为德语,它使用逗号而不是小数位的句点(句点)。因此,为浮动十进制数报告“输入字符串:”0,8“”。

java.lang.NumberFormatException:对于输入字符串:“0,8”
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)

在此示例中,修改支持的区域和语言设置以使用美国英语解决了此问题,但这是客户机器的全局级别。特定客户发现,如果他们在Vivado启动脚本中添加了以下内容,则只需在Vivado Design Suite中设置US-English即可在本地处理问题。

添加以下内容:

 export LC_CTYPE =“en_US.UTF-8” 
export LC_NUMERIC =“en_US.UTF-8”
LC_TIME = “的en_US.UTF-8”
LC_COLLATE = “的en_US.UTF-8”
LC_MONETARY = “的en_US.UTF-8”
LC_MESSAGES = “的en_US.UTF-8”
LC_PAPER = “的en_US.UTF-8”
LC_NAME = “的en_US.UTF-8”
LC_ADDRESS = “的en_US.UTF-8”
LC_TELEPHONE = “的en_US.UTF-8”
LC_MEASUREMENT = “的en_US.UTF-8”
LC_IDENTIFICATION = “的en_US.UTF-8”
LC_ALL =的en_US.UTF-8

取代

 LANG = de_DE.UTF -8- 
LC_NUMERIC = “de_DE.UTF-8”
编辑 重设标签(回车键确认) 标为违禁 关闭 合并 删除

提问于 2018-07-31 14:12:34 +0800

这个帖子被标记为一个社区wiki

这个帖子是一个wiki(维基). 任何一个积分 >500的人都可以完善它