我是新手代号并尝试全新安装并且无法运行模拟器。
我安装了eclipse版本:Oxygen.2 Release(4.7.2)Build id:20171218-0600 在Windows 7企业Service Pack 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项目复选框,下面有一条消息“Java 8项目需要更新的Eclipse版本。
答案 0 :(得分: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/