Tôi tiếp tục gặp lỗi này trong khi chạy và tôi không biết nguyên nhân gây ra lỗi đó. Nó tin rằng có một tập tin bị thiếu?Lỗi thời gian chạy Java lạ - currency.data
Caused by: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.7.0_07\lib\currency.data
currency.data
là gì và ai cũng có thể đề nghị tại sao điều này xảy ra, JDK của tôi không phải là cũ vì chúng ta đang ở trong 7u17 bây giờ.
Exception in thread "AWT-EventQueue-0" java.lang.InternalError
at java.util.Currency$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.Currency.<clinit>(Unknown Source)
at java.text.DecimalFormatSymbols.initialize(Unknown Source)
at java.text.DecimalFormatSymbols.<init>(Unknown Source)
at java.text.DecimalFormatSymbols.getInstance(Unknown Source)
at java.text.NumberFormat.getInstance(Unknown Source)
at java.text.NumberFormat.getNumberInstance(Unknown Source)
at java.util.Scanner.useLocale(Unknown Source)
at java.util.Scanner.<init>(Unknown Source)
at java.util.Scanner.<init>(Unknown Source)
at ciphor.CiCompile$7.actionPerformed(CiCompile.java:458)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.7.0_07\lib\currency.data (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
... 48 more
Tôi đang chạy chương trình của mình bằng môi trường JDK, tôi đã kiểm tra thư mục jre7 và currency.data
có mặt ở đó! Tại sao nó chỉ xuất hiện trong thư mục jre?
Có thể đáng để gỡ cài đặt/cài đặt lại bạn jdk/jre? – assylias
@assylias Tôi sẽ cập nhật JDK của mình lên phiên bản mới nhất và xem tệp đó có xuất hiện kỳ diệu hay không. – Ciphor
Tôi nghĩ rằng nó được cho là nằm trong tập tin rt.jar ... – assylias