APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Ejss cannot compile into model.zip but can be run in Ejss emulator post and replies

Return to the Ejss cannot compile into model.zip but can be run in Ejss emulator thread
Login to post to this thread

Ejss cannot compile into model.zip but can be run in Ejss emulator
lookang Avatar
lookang
245 Posts

i am under the impression that EJS cannot compile complex (many objects etc) into ejss_model_XXX.zip while able to run it in the EJss Emulator.

 

Is there a fix to this problem in the near future, or is it a design of Ejss to be very light in number of objects in the simulation view?

 

attached is a scr that runs in emulator but cannot be complied into ejss_model_SHMresonance04.zip.

 

can help make it compile dear professor paco?

:)

thanks!

Attached File: ejss_src_SHMresonance04.zip


OSP@SG blog
OSP@SG Digital Library

Replies to Ejss cannot compile into model.zip but can be run in Ejss emulator

Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
Chi-Feng Lin
28 Posts

hi

It seems OK to compile into zip file to me by EJS_5.0_140730. See a attached file.



I had the same problem before. You can try to remove all java and install the latest version java again.


Chi-Feng Lin

Attached File: ejss_model_SHMresonance04.zip



Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
lookang Avatar
lookang
245 Posts

dear Chi-Feng Lin ,

thank you for compiling :)

i remove all java and install latest java.
still cannot compile

i am on windows XP, r u on Mac or windows 7 or 8?

the error are:
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at org.mozilla.javascript.ScriptableObject.getSlot(ScriptableObject.java:2719)
at org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:452)
at org.mozilla.javascript.IdScriptableObject.get(IdScriptableObject.java:329)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2184)
at org.mozilla.javascript.ScriptableObject.getClassPrototype(ScriptableObject.java:2074)
at org.mozilla.javascript.TopLevel.getBuiltinPrototype(TopLevel.java:137)
at org.mozilla.javascript.ScriptableObject.getObjectPrototype(ScriptableObject.java:2037)
at org.mozilla.javascript.Arguments.(Arguments.java:29)
at org.mozilla.javascript.NativeCall.(NativeCall.java:55)
at org.mozilla.javascript.ScriptRuntime.createFunctionActivation(ScriptRuntime.java:3186)


OSP@SG blog
OSP@SG Digital Library


Re: Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
Chi-Feng Lin
28 Posts

win 7

Chi-Feng Lin



Re: Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
lookang Avatar
lookang
245 Posts

still cannot on win7, i even change my workspace also cannot compile.

error msg is

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at org.mozilla.javascript.IdScriptableObject.has(IdScriptableObject.java:306)
at org.mozilla.javascript.NativeCall.(NativeCall.java:54)
at org.mozilla.javascript.ScriptRuntime.createFunctionActivation(ScriptRuntime.java:3186)
at org.mozilla.javascript.gen.JSUGLIFY_88._c_anonymous_149(JSUGLIFY)
at org.mozilla.javascript.gen.JSUGLIFY_88.call(JSUGLIFY)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.mozilla.javascript.gen.JSUGLIFY_88._c_walk_154(JSUGLIFY:1537)
at org.mozilla.javascript.gen.JSUGLIFY_88.call(JSUGLIFY)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen.JSUGLIFY_88._c_doit_379(JSUGLIFY:3379)
at org.mozilla.javascript.gen.JSUGLIFY_88.call(JSUGLIFY)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
at org.mozilla.javascript.gen.JSUGLIFY_88._c_anonymous_378(JSUGLIFY:3396)
at org.mozilla.javascript.gen.JSUGLIFY_88.call(JSUGLIFY)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.mozilla.javascript.gen.JSUGLIFY_88._c_anonymous_149(JSUGLIFY:1506)
at org.mozilla.javascript.gen.JSUGLIFY_88.call(JSUGLIFY)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.mozilla.javascript.gen.JSUGLIFY_88._c_walk_154(JSUGLIFY:1537)
at org.mozilla.javascript.gen.JSUGLIFY_88.call(JSUGLIFY)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen.JSUGLIFY_88._c_doit_379(JSUGLIFY:3379)
at org.mozilla.javascript.gen.JSUGLIFY_88.call(JSUGLIFY)


OSP@SG blog
OSP@SG Digital Library


Re: Re: Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
lookang Avatar
lookang
245 Posts

i did it!

i reformat to factory setting for the laptop installing the 64 bit Windows Offline (64-bit) works while the 32 bit Windows Offline (32-bit) one fails!

download your copy here
http://java.com/en/download/manual.jsp
select
Windows Offline (64-bit)
Export file created successfully : ejss_model_SHMresonance04.zip

Thanks for the tips Chi-Feng Lin :)

Post edited August 3, 2014 at 4:12 AM EST.


OSP@SG blog
OSP@SG Digital Library


Re: Re: Re: Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
lookang Avatar
lookang
245 Posts

dear Chi-Feng Lin,

can try to compile this model too?
it seems to fail even with java 64 bit

thanks!

Attached File: ejss_src_SHM.zip


OSP@SG blog
OSP@SG Digital Library


Re: Re: Re: Re: Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
Chi-Feng Lin
28 Posts

Dear lookang

It exports normally in my OS.
Your EJSS job is excellent.

================
Win 7 x64
EJS_5.0_140730
Java 7 Update 60 (64-bit)    
Java 7 Update 60    =>   (I don't why this is in my system, I can't remember if I installed it or not)
================


Chi-Feng Lin

Attached File: ejss_model_SHM.zip



Re: Re: Re: Re: Re: Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
lookang Avatar
lookang
245 Posts

dear Chi-Feng Lin,

thank you for the compliments, yes what i do with EJS and tracker modeling is what that defines me professional now :)

currently testing on windows 8.1 suggests it is the Java version 67 that also allow me to compiled this correctly, not the x64 Java 60 that previously thought to be the reason why it works.

http://weelookang.blogspot.sg/2014/08/ejss-shm-model-with-all-7-graphs.html

PASS:
Win 7 x64
EJS_5.0_140730
Java 7 Update 60 (64-bit)
PASS:
Win 8.1 x64
EJS_5.0_140730
Java 1.7.0_67 found C:/Program Files/Java/jre7/ (32-bit)

FAILED.
Win 8.1 x64
EJS_5.0_140730
C:/Program Files (x86)/Java/jre7/

so my hypothesis is need a 64 bit OS (x32 OS windows XP and windows 7 didn't work) with Java 1.7.0_67 found C:/Program Files/Java/jre7/ (32-bit)


OSP@SG blog
OSP@SG Digital Library


Re: Re: Re: Re: Re: Re: Re: Re: Ejss cannot compile into model.zip but can be run in Ejss emulator -
Wolfgang
192 Posts

I have been using Java 8 u 11 to compile EjsS models on both Mac OS X and 64 bit Windows 7 without difficulty.  One thing that you should check is the "Generate code for Java Version" setting in EJS Options.  (See next to last toolbar button on the right hand side.)  I am generating code for Java 1.6 (known as Java 6) but I am using Java 8.



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book