Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

tweaking your script engine for Java 8

Custom Title Activated
Loyal Member
Joined
Mar 14, 2010
Messages
5,363
Reaction score
1,343
and how do i add the missing imports and fix the brackets? i am newibe. sorry about that ;/

Ctrl + Shift + O : Organize imports
Ctrl + Shift + T : Open Type
Ctrl + Shift + F4 : Close all Opened Editors
Ctrl + O : Open declarations
Ctrl + E : Open Editor
Ctrl + / : Line Comment
Alt + Shift + R : Rename
Alt + Shift + L : extract to Local Variable
Alt + Shift + M : extract to Method
F3 : Open Declaration
 
Newbie Spellweaver
Joined
Aug 15, 2012
Messages
10
Reaction score
0
Ctrl + Shift + O : Organize imports
Ctrl + Shift + T : Open Type
Ctrl + Shift + F4 : Close all Opened Editors
Ctrl + O : Open declarations
Ctrl + E : Open Editor
Ctrl + / : Line Comment
Alt + Shift + R : Rename
Alt + Shift + L : extract to Local Variable
Alt + Shift + M : extract to Method
F3 : Open Declaration
Thank you very much,but i still dont understand how do i add the missing imports.
 
Newbie Spellweaver
Joined
Dec 29, 2013
Messages
31
Reaction score
11
You can probably simply do

Code:
                engine.eval("load('nashorn:mozilla_compat.js');");
Before loading the script file.

However search/replace seems like a much better idea as it does not duck with line numbers in the script.

Also: I don't get the Groovy fandom but whatever. Scala is a very solid JVM language though.

I believe this is only a workaround rhino scripting is pretty much dead for sometime now, at least they should rewrite the entire scripting in different scripting language or something that is not part of a JSR 292.. and lastly in today moopledev/odin needs a makeover most of the code can be written to be efficient since we are in the era of java 8 :) cheers
 
Newbie Spellweaver
Joined
Oct 12, 2010
Messages
30
Reaction score
18
I believe this is only a workaround rhino scripting is pretty much dead for sometime now, at least they should rewrite the entire scripting in different scripting language or something that is not part of a JSR 292.. and lastly in today moopledev/odin needs a makeover most of the code can be written to be efficient since we are in the era of java 8 :) cheers

I believe that you have no clue what you are talking about. Why would a different script engine (especially a non JSR 292 script engine?! (no script engine is part of JSR 292, it does not specify any)) be better? Also: Oracle JDK 8 Nashorn is a better (and different) script engine than Rhino.

There certainly is code that can be made more pretty using Java 8 goodness but this does not nescessarily make it more "efficient".
 
Joined
Apr 10, 2008
Messages
4,087
Reaction score
1,264
I believe that you have no clue what you are talking about. Why would a different script engine (especially a non JSR 292 script engine?! (no script engine is part of JSR 292, it does not specify any)) be better? Also: Oracle JDK 8 Nashorn is a better (and different) script engine than Rhino.

There certainly is code that can be made more pretty using Java 8 goodness but this does not nescessarily make it more "efficient".

You're talking to E.D., don't even try. Every post of his contains either shenanigans or just nonsense. He likes to assume things and talk with big words to make him seem smart, but overall he doesn't know what he's talking about.
 
Newbie Spellweaver
Joined
Dec 29, 2013
Messages
31
Reaction score
11
I believe that you have no clue what you are talking about. Why would a different script engine (especially a non JSR 292 script engine?! (no script engine is part of JSR 292, it does not specify any)) be better? Also: Oracle JDK 8 Nashorn is a better (and different) script engine than Rhino.

There certainly is code that can be made more pretty using Java 8 goodness but this does not nescessarily make it more "efficient".


what Im actually trying to say is that JDKs shipped with a JavaScript scripting engine based on rhino and today it is being shipped with nashorn while this has break mostly of moopledev/odin scripts I find it abit out of portion to actually replaced by adding engine.eval("load('nashorn:mozilla_compat.js');"); rather than actually replacing it to follow nashorn.I believe this shows why on jdk chose to replace nashorn



and secondly about odin/moopledev yes there are ways to make the code more pretty and maybe efficient but take a look at sources like v144 which is based on Lithium which is freaking terrible to be honest.. I never disagree about odin is bad or anything like this but the source today which mostly based on Lithium which has become quite horrible if you ever followed the source today peace.. some of the sources still uses mina 1.1 ? and rmi was removed in what way was it removed when all they did was to merged it in one console the public development has been dead. there has been no refactors to the code.

I believe you can find it around here and as far as I know they
increase heap memory size in java cause most of them are unable to solve memory leaks.. but if original odin was around today I'm sure it would have been much much better, and today when everything is public selfishness has kicked in... peace
 
Last edited:
Joined
Apr 10, 2008
Messages
4,087
Reaction score
1,264
what Im actually trying to say is that JDKs shipped with a JavaScript scripting engine based on rhino and today it is being shipped with nashorn while this has break mostly of moopledev/odin scripts I find it abit out of portion to actually replaced by adding engine.eval("load('nashorn:mozilla_compat.js');"); rather than actually replacing it to follow nashorn.I believe this shows why on jdk chose to replace nashorn



and secondly about odin/moopledev yes there are ways to make the code more pretty and maybe efficient but take a look at sources like v144 which is based on Lithium which is freaking terrible to be honest.. I never disagree about odin is bad or anything like this but the source today which mostly based on Lithium which has become quite horrible if you ever followed the source today peace.. some of the sources still uses mina 1.1 ? and rmi was removed in what way was it removed when all they did was to merged it in one console the public development has been dead. there has been no refactors to the code.

I believe you can find it around here and as far as I know they
increase heap memory size in java cause most of them are unable to solve memory leaks.. but if original odin was around today I'm sure it would have been much much better, and today when everything is public selfishness has kicked in... peace

I'm seriously wondering - why aren't you sticking to your original account, Multo (which was originally E.D.) and keep coming on those different accounts? You're violating the rules, just sayin'.
 
Mythic Archon
Joined
Dec 25, 2011
Messages
723
Reaction score
97
what Im actually trying to say is that JDKs shipped with a JavaScript scripting engine based on rhino and today it is being shipped with nashorn while this has break mostly of moopledev/odin scripts I find it abit out of portion to actually replaced by adding engine.eval("load('nashorn:mozilla_compat.js');"); rather than actually replacing it to follow nashorn.I believe this shows why on jdk chose to replace nashorn



and secondly about odin/moopledev yes there are ways to make the code more pretty and maybe efficient but take a look at sources like v144 which is based on Lithium which is freaking terrible to be honest.. I never disagree about odin is bad or anything like this but the source today which mostly based on Lithium which has become quite horrible if you ever followed the source today peace.. some of the sources still uses mina 1.1 ? and rmi was removed in what way was it removed when all they did was to merged it in one console the public development has been dead. there has been no refactors to the code.

I believe you can find it around here and as far as I know they
increase heap memory size in java cause most of them are unable to solve memory leaks.. but if original odin was around today I'm sure it would have been much much better, and today when everything is public selfishness has kicked in... peace

How about instead of complaining about the current sources and how they are so terrible, you "refactor" the code? Public development is dead because of people like you complaining when they have no idea what the hell they are talking about.
 
Custom Title Activated
Loyal Member
Joined
Nov 14, 2008
Messages
1,025
Reaction score
641
what Im actually trying to say is that JDKs shipped with a JavaScript scripting engine based on rhino and today it is being shipped with nashorn while this has break mostly of moopledev/odin scripts I find it abit out of portion to actually replaced by adding engine.eval("load('nashorn:mozilla_compat.js');"); rather than actually replacing it to follow nashorn.I believe this shows why on jdk chose to replace nashorn



and secondly about odin/moopledev yes there are ways to make the code more pretty and maybe efficient but take a look at sources like v144 which is based on Lithium which is freaking terrible to be honest.. I never disagree about odin is bad or anything like this but the source today which mostly based on Lithium which has become quite horrible if you ever followed the source today peace.. some of the sources still uses mina 1.1 ? and rmi was removed in what way was it removed when all they did was to merged it in one console the public development has been dead. there has been no refactors to the code.

I believe you can find it around here and as far as I know they
increase heap memory size in java cause most of them are unable to solve memory leaks.. but if original odin was around today I'm sure it would have been much much better, and today when everything is public selfishness has kicked in... peace

The mozilla_compat chirography ,you must be the default language . I think the chirography engine of practical function of these will take and they do not make sense at all this. to apprehend ...

Is that Mina to adequate maintain load capacity very high adapted, feebleminded fools only became a Netty increase of reticulated bandwagon do not know the pros and cons is a tendency to flustered fiasco.

Why do you have to set your Ducking text color to grey at arbitrary locations?

How about instead of complaining about the current sources and how they are so terrible, you "refactor" the code? Public development is dead because of people like you complaining when they have no idea what the hell they are talking about.

Code refactoring is a bottomless pit of dark abyss. Taking that into consideration, you would have to either be god or insane to even attempt to refactor the OdinMS into something coherent
 
Newbie Spellweaver
Joined
Sep 17, 2013
Messages
82
Reaction score
137
You can probably simply do

Code:
                engine.eval("load('nashorn:mozilla_compat.js');");
Before loading the script file.

However search/replace seems like a much better idea as it does not duck with line numbers in the script.

Also: I don't get the Groovy fandom but whatever. Scala is a very solid JVM language though.

I may be doing something wrong, but after the switch to Java 8, scripts load extremely slowly (startup can take up to 5 minutes with around 20 scripts). I tried both OP's method as well as the engine.eval before calling the script, and I can only conclude that mozilla_compat is not a good workaround.
 
Joined
Apr 10, 2008
Messages
4,087
Reaction score
1,264
what Im actually trying to say is that JDKs shipped with a JavaScript scripting engine based on rhino and today it is being shipped with nashorn while this has break mostly of moopledev/odin scripts I find it abit out of portion to actually replaced by adding engine.eval("load('nashorn:mozilla_compat.js');"); rather than actually replacing it to follow nashorn.I believe this shows why on jdk chose to replace nashorn



and secondly about odin/moopledev yes there are ways to make the code more pretty and maybe efficient but take a look at sources like v144 which is based on Lithium which is freaking terrible to be honest.. I never disagree about odin is bad or anything like this but the source today which mostly based on Lithium which has become quite horrible if you ever followed the source today peace.. some of the sources still uses mina 1.1 ? and rmi was removed in what way was it removed when all they did was to merged it in one console the public development has been dead. there has been no refactors to the code.

I believe you can find it around here and as far as I know they
increase heap memory size in java cause most of them are unable to solve memory leaks.. but if original odin was around today I'm sure it would have been much much better, and today when everything is public selfishness has kicked in... peace

Dude u talking to me like a SpaceMan Speak english pls...
 
Legendary Battlemage
Joined
Jun 16, 2011
Messages
610
Reaction score
347
ty 4 ur rls oxyhard im going to use this man i hope u rls more stuff so i can leech all ur stuff! :)
 
Back
Top