You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows7下ldraw2sunflow运行失败,报索引越界等错误求助

Fixing ldraw2sunflow Startup Issues on Windows 7

Let’s work through the two key problems in your error log to get the app running again:

1. Resolve the Windows Registry Permission Warning

The first error is a common permission hiccup on Windows 7 for Java apps that use system preferences:

Jan 31, 2018 3:27:49 PM java.util.prefs.WindowsPreferences WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

Error code 5 means "access denied"—here’s how to fix it:

  • Press Win + R, type regedit, and hit Enter to open the Registry Editor.
  • Navigate to HKEY_LOCAL_MACHINE\Software\JavaSoft.
  • Right-click the JavaSoft folder, select Permissions.
  • Find your user account in the list, check the Write (or Full Control) box under "Allow", then click Apply > OK.
  • Alternatively, you can test launching ldraw2sunflow by right-clicking its shortcut/JAR file and selecting Run as administrator to bypass the permission check temporarily.

2. Fix the StringIndexOutOfBoundsException

The second crash is triggered by a broken string operation, almost certainly caused by corrupted preferences from the first issue:

Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at org.ldraw2sunflow.util.PartF...

To reset the app’s corrupted settings:

  • Open the Registry Editor again (as above).
  • Navigate to either HKEY_LOCAL_MACHINE\Software\JavaSoft\Prefs\org\ldraw2sunflow or HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\ldraw2sunflow (whichever exists).
  • Right-click the ldraw2sunflow folder and select Delete to wipe the broken preferences.
  • If the app stores local config files, check your user directory (e.g., C:\Users\[YourName]\.ldraw2sunflow or similar) for any preference files, delete them, and restart the app.
  • If the problem sticks around, try re-downloading the ldraw2sunflow JAR file and replacing your current copy—this ensures you’re working with a clean, uncorrupted version.

After completing these steps, launch ldraw2sunflow again—it should start fresh with default settings and no more errors.

内容的提问来源于stack exchange,提问作者posfan12

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:13:57