【问题标题】:CodenameOne simulation not finding Theme.resCodenameOne 模拟未找到 Theme.res
【发布时间】:2018-08-16 06:47:22
【问题描述】:

我是代号一的新手,正在尝试全新安装,但无法运行模拟器。

我已经安装了 eclipse 版本:Oxygen.2 Release (4.7.2) Build id: 20171218-0600 在 Windows 7 企业服务包 1 上使用 Java 1.8.0_162 并且遇到以下异常,这似乎与

[EDT] 0:0:0,64 - Exception: java.io.IOException - /theme.res not found
java.io.IOException: /theme.res not found
    at com.codename1.ui.util.Resources.open(Resources.java:740)
    at com.codename1.ui.util.Resources.openLayered(Resources.java:704)
    at com.codename1.ui.util.Resources.openLayered(Resources.java:668)
    at com.codename1.ui.plaf.UIManager.initFirstTheme(UIManager.java:1827)
    at com.drb.test01.MyApplication.init(MyApplication.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.codename1.impl.javase.Executor$1$1.run(Executor.java:117)
    at com.codename1.ui.Display.processSerialCalls(Display.java:1129)
    at com.codename1.ui.Display.mainEDTLoop(Display.java:924)
    at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
    at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
java.lang.NullPointerException
    at com.drb.test01.MyApplication.start(MyApplication.java:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.codename1.impl.javase.Executor$1$1.run(Executor.java:123)
    at com.codename1.ui.Display.processSerialCalls(Display.java:1129)
    at com.codename1.ui.Display.mainEDTLoop(Display.java:924)
    at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
    at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)

我已关注这些主题并应用了所有建议,但均未成功。我可以提供更多信息吗?

我注意到一个奇怪的事情是在 New CodenameOne Project 窗口上有一个灰色的 Java 8 Project 复选框,并且在“Java 8 project requires a newer Eclipse version.

【问题讨论】:

  • Codename One 似乎没有检测到您正在使用的 JDK 8。你确定这是 Eclipse 选择的 JDK 吗?确保在 eclipse.ini 文件中指定 JDK 并重新创建项目:wiki.eclipse.org/Eclipse.ini
  • JAVA_HOME 设置正确,但 eclipse.ini 不正确!
  • 添加 -vm C:\Program Files\Java\jdk1.8.0_162\bin\javaw.exe 所以我做了答案。

标签: eclipse eclipse-plugin codenameone


【解决方案1】:

将 -vm 添加到我的 eclipse.ini 中成功了:

-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
C:\Users\daveb\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
-vm

C:\Program Files\Java\jdk1.8.0_162\bin\javaw.exe**
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-11-16
    • 2018-05-20
    • 2018-05-19
    • 2018-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-04
    相关资源
    最近更新 更多