Slapstick 10 Posted January 23, 2012 I think a major reason for choosing Java over other languages is there are no other interpreters with the stability and maturity of the JVM. I suspect BIS wants to move away from maintaining their own compiler/interpreter and some project on SourceForge isn't going to cut it for them, they need an industrial strength solution. The only other serious contender would be Lua (and maybe C#), and I am actually a little surprised BIS didn't opt for Lua. in Java for example you can download a class from "somewhere" and execute arbitrary code ( through ClassLoader). As far as i know this can't be done in C++. But a Java application can also use a SecurityManager to specify exactly what an application is allowed to do, down to what methods the code can call on various classes). So an application could be configured not to allow arbitrary code to be downloaded either by restricting access to the ClassLoader or by restricting access to classes in java.net. Or code could only be allowed to download from specific URLs, or arbitrary code could be downloaded and executed, but the downloaded code would be denied access to system resources (files, sockets, etc) and only be allowed to call specific methods of some API. I have no idea if BIS will make use of the Security features, but they are there if needed. I just wish we could starting playing with the beta patch. This waiting is killing me. Share this post Link to post Share on other sites
Nicholas 5 Posted January 23, 2012 (edited) I have not got around to learning the scripting language of OFP, ArmA, or Take On Helicopters (Except basic things like addWeapon), nor have I ever learned Java. But I did play around with Ruby, which I really liked because it was so simple. Edited January 23, 2012 by Nicholas Share this post Link to post Share on other sites
maruk 80 Posted January 23, 2012 Java Virtual Machine should allow you to use various programming languages: http://en.wikipedia.org/wiki/List_of_JVM_languages Java, Lua and Ruby are some of the contenders (just note that in-house we test Java only so far). Share this post Link to post Share on other sites
rfc 10 Posted January 23, 2012 Java Virtual Machine should allow you to use various programming languages:http://en.wikipedia.org/wiki/List_of_JVM_languages Java, Lua and Ruby are some of the contenders (just note that in-house we test Java only so far). Leave that to figure out for the community :D Share this post Link to post Share on other sites
jedra 11 Posted January 25, 2012 (edited) Although I am looking forward to this release, I am slightly worried that the editing forums are going to be a mish mash of code snippets from all kinds of languages! At least previously it was either sqf or sqs! Are we going to have; Editing forum : Lua Editing forum : Ruby Editing forum : Java Editing forum : visual COBOL so on and so forth or will there be forum standards to put code snippets in a particular form. Although this is somewhat 'tongue-in-cheek', it could get messy. Edited January 25, 2012 by Jedra Share this post Link to post Share on other sites
noubernou 77 Posted January 25, 2012 Although I am looking forward to this release, I am slightly worried that the editing forums are going to be a mish mash of code snippets from all kinds of languages! At least previously it was either sqf or sqs!Are we going to have; Editing forum : Lua Editing forum : Ruby Editing forum : Java Editing forum : visual COBOL so on and so forth or will there be forum standards to put code snippets in a particular forum. Although this is somewhat 'tongue-in-cheek', it could get messy. Yea, I have some worries about this too... :p Share this post Link to post Share on other sites
Sealife 22 Posted January 25, 2012 I'm sure if people tag there questions it won't be big mess for TOH [language] question ? When arma 3 is out well probably diff story :) Share this post Link to post Share on other sites
jedra 11 Posted January 25, 2012 I'm sure if people tag there questions it won't be big mess for TOH [language] question ? When arma 3 is out well probably diff story :) I am not necessarily talking about working out what language an answer is in. Currently if you ask a 'How Do I?' question, the answer is mostly as a sqf. With many different languages, you're going to get multiple answers! Also by having multiple languages, the pool of experts might be smaller than it would be normally. I suppose an answer would be to post the Java that these languages create before it heads off to be crunched by the JVM, but some of that stuff is not exactly human readable! I guess on the plus side, we'll all become multi-lingual in Java languages. These are merely observations - I am chomping at the bit to play with this!!!! Share this post Link to post Share on other sites
Slapstick 10 Posted January 25, 2012 I have no doubt that once I start posting Groovy snippets everyone will see the light and jump on the Groovy bandwagon ;) However, I suspect most people will stick with plain old Java, and the rest will settle on one or two languages that are the easiest to work with. For example, while there are many languages that run on the JVM not all of them compile to Java bytecode. Similarly other languages, like JRuby, require extra statements to be added to the code to generate normal Java .class files, so writing a JRuby module that plays nicely with other modules in the JVM is more work than the same module written in Groovy. More than a common JVM language, I hope that the community settles on a common build and dependency management system. I myself prefer Apache Maven and think that would be the easiest for non-programmers to use. I wouldn't recommend Ant to my worst enemy and it is certainly not something new programmers trying to script a mission should need to learn. The biggest benefit to Maven (and it is huge) is its dependency management system which makes it trivial to reuse, share, and distribute Java modules. If a person has developed a module and deployed it to a Maven repositories other people only need to add a few lines to a config file to use that module; Maven will download the module, other modules it depends on, and any related documentation. Then there are things like Gradle which combines Ant and Maven into a single build system. Maybe someone at BIS could tell us what they are using to build their Java code? Do you use Maven? Would BIS consider hosting a Maven repository? Setting up a Maven repository is relatively trivial. Share this post Link to post Share on other sites
major_shepard 82 Posted January 26, 2012 Yeah gonna be a big mess if everyone comes with one over langage for mod and other script :rolleyes: Still don't know if BIS going to deliver the ArmA 3 Java API as libraries and not simply javaDoc. Moreover as the API will wrap the native Engine (C++) certainly trough JNI, means that we must have native libraries (dll) if we want to run/debug Java into Eclipse and others ^^ Share this post Link to post Share on other sites
nuxil 2 Posted January 31, 2012 i could not resist. Mk3qkQROb_k Java, Lua and Ruby are some of the contenders (just note that in-house we test Java only so far). i demand that Python to be considerd too :D Share this post Link to post Share on other sites
Serclaes 0 Posted January 31, 2012 How about Jython? Share this post Link to post Share on other sites
A.R.Mageddon 0 Posted February 2, 2012 (edited) Java and C# programs use garbage collector of their virtual machine which made development ton of easier and safer compare to C++ (memory access violation, buffer overflow etc). Moreover C++ has few security aspects compare Java. What about for a given addon running malicious code while you are playing ArmA 3 :D:rolleyes: Also C++ is also a statically compiled language, which means you would have to create a DLL which the game would have to pipe in. As DLL authoring is fairly advanced, and full of traps for the unwary (http://en.wikipedia.org/wiki/DLL_Hell), its not really the kind of thing you would want to use as a scripting language. You could of course write an interpreter for C++ so it could run as a scripting language ... but it would be a mildly insane thing to do. (although somebody has done it ... http://www.softintegration.com/) Editing forum : visual COBOL Edited February 2, 2012 by A.R.Mageddon Share this post Link to post Share on other sites
sickboy 13 Posted February 2, 2012 Also C++ is also a statically compiled language, which means you would have to create a DLL which the game would have to pipe in. As DLL authoring is fairly advanced, and full of traps for the unwary (http://en.wikipedia.org/wiki/DLL_Hell), its not really the kind of thing you would want to use as a scripting language. "particularly legacy 16-bit editions which all run in a single memory space"... It's nearly 20 years ago that Microsoft introduced Windows '95, 32-bit OS :-) And I think post 2000 the issue is fairly non existent? Share this post Link to post Share on other sites
Serclaes 0 Posted February 2, 2012 To be fair, there also is a Jar Hell. -> http://en.wikipedia.org/wiki/Java_Classloader#JAR_hell Maven ftw! Share this post Link to post Share on other sites
A.R.Mageddon 0 Posted February 3, 2012 (edited) "particularly legacy 16-bit editions which all run in a single memory space"... It's nearly 20 years ago that Microsoft introduced Windows '95, 32-bit OS :-) Well you would have thought so wouldn't you ... I mean it seems reasonable to assume that in 20 years Microsoft might be able to fix fundamental flaws. But like bad landlords, a lick of paint and a quick makeover can hide a multitude of sins ... http://blogs.isosoftsol.com/post/2009/12/21/Side-by-Side-%28SxS%29-DLLs-Manifests-and-Windows-7.aspx And I think post 2000 the issue is fairly non existent? Would that it were so ... but M$ have decided that retro is cool ... http://drdobbs.com/cpp/227300037 As I said .... C++ is a very deep and complicated language, and most definitely not something you would really want to use for scripting. ;) For the record Serclaes ... Java is also a very deep and complicated language, like C++ (and fine wines), its had time to mature ... and sometimes that maturity comes at a cost (like fine wines). Edited February 3, 2012 by A.R.Mageddon Share this post Link to post Share on other sites
RAKtheUndead 0 Posted February 13, 2012 Was a few months away from the forums, came back, found this thread about JVM, doubled checked I'm not on stackoverflow. Wtf, I'm in a game forum and they're talking about the JVM? :eek: Nah, if this was Stack Overflow, they'd be talking about how Haskell is the ultimate language, and anybody who doesn't learn it is a peon who doesn't understand real programming. Personally, I think Haskell is a toy language and that nothing particularly useful is going to come out of it, but I've got a vendetta against most pure functional languages. Java, on the other hand, is just fine by me! Share this post Link to post Share on other sites
.kju 3244 Posted February 18, 2012 This may interest some people: Arma2NET :) Share this post Link to post Share on other sites
DnA 5133 Posted February 22, 2012 The latest beta patch finally offers a sneak peak into RV Java! Share this post Link to post Share on other sites
sickboy 13 Posted February 22, 2012 The latest beta patch finally offers a sneak peak into RV Java! BNE!!!!!!! Congrats :) Share this post Link to post Share on other sites
Sniperwolf572 758 Posted February 22, 2012 Aww man, and I'm at work. Quick, someone do some performance tests against SQF. :p Share this post Link to post Share on other sites
rok 0 Posted February 22, 2012 Cool. Haven't done Java in years... Only issue I had with sample mission was switching back to Eclipse at debug breakpoint. (Alt-Tab didn't work, had to use some ctrl-shift-esc and ctrl-alt-del magic) Running game in windowed mode helped a lot. :) Share this post Link to post Share on other sites
.kju 3244 Posted February 22, 2012 (edited) Nice Got it almost fully working. I think this is my problem: > make sure the project (and JNIScripting.jar) are listed under the Source tab in the debug configuration If someone could add picture to the guide, it would help tremendously to figure it out more quickly: http://community.bistudio.com/wiki/Java_Scripting Also to offer an existing project for download to move into the editor missions folder and adjust it might be easier. Is there a way to generate JavaDoc for the existing RVEngine commands? Or will you provide it as download? Cheers. :bounce3: Edited February 22, 2012 by .kju [PvPscene] Share this post Link to post Share on other sites
DnA 5133 Posted February 22, 2012 Is there a way to generate JavaDoc for the existing RVEngine commands? There will be, but this functionality is currently broken. Share this post Link to post Share on other sites
Serclaes 0 Posted February 22, 2012 Great job! Out of curiosity, why exactly do we have to remove the Object as parent class. Iirc every class is extended from object anyway? Oo Share this post Link to post Share on other sites