ZX700 Posted October 9, 2017 Share Posted October 9, 2017 Hi guys, Every time I update my script in IntelliJ, I naturally want to test it in OSBot. Problem is that if the client is already open then I can't overwrite the local script as it is loaded into the client. Is there a way to override this and delete the script anyway? It is a pain to keep closing and reopening the client every time. Thanks Quote Link to comment Share on other sites More sharing options...
Deceiver Posted October 9, 2017 Share Posted October 9, 2017 it will still update it to see just change the versions and either log it or have it in your paint and you will see the difference 1 Quote Link to comment Share on other sites More sharing options...
08egans Posted October 9, 2017 Share Posted October 9, 2017 well when im using eclipse i just stop the script, then export over it and then just reload scripts and it works, im assuming it would have been the same in IntelliJ? 1 Quote Link to comment Share on other sites More sharing options...
Token Posted October 9, 2017 Share Posted October 9, 2017 Create a jar artifact that exports the script jar into the scripts directory 1 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted October 9, 2017 Share Posted October 9, 2017 In Eclipse I make it export the class files straight to the osbot script folder and everytime I hit save the files gets updated Maybe it does the same in intelliJ? 2 Quote Link to comment Share on other sites More sharing options...
ZX700 Posted October 9, 2017 Author Share Posted October 9, 2017 5 minutes ago, Deceiver said: it will still update it to see just change the versions and either log it or have it in your paint and you will see the difference I've given it a go and my paint hasn't changed . 6 minutes ago, Token said: Create a jar artifact that exports the script jar into the scripts directory I believe I've done that, Output directory: C:\Users\ZX700\OSBot\Scripts. Quote Link to comment Share on other sites More sharing options...
dreameo Posted October 9, 2017 Share Posted October 9, 2017 I think you have the jar within the directory and intelliJ has access to that, maybe that's why it thinks the .jar is being used and can't be deleted or updated. 1 Quote Link to comment Share on other sites More sharing options...
ZX700 Posted October 9, 2017 Author Share Posted October 9, 2017 The message I'm getting is this: Warning: Artifacts builder: Cannot delete file 'C:/Users/ZX700/OSBot/Scripts/ZX_Agility.jar' C:\Users\ZX700\IdeaProjects\ZX_Agility\src\main.java ! Information: java C:\Users\ZX700\IdeaProjects\ZX_Agility\src\main.java ! Information: java: Recompile with -Xint:unchecked for details. Like I say, if I terminate OSBot then I no longer get this warning. Quote Link to comment Share on other sites More sharing options...
ZX700 Posted October 9, 2017 Author Share Posted October 9, 2017 Furthermore if I try to delete the .jar using file explorer I get the message File In Use: 'The action can't be completed because the file is open in Java(TM) Platform SE binary Close the file and try again.' Quote Link to comment Share on other sites More sharing options...
ZX700 Posted October 9, 2017 Author Share Posted October 9, 2017 (edited) 36 minutes ago, Deceiver said: it will still update it to see just change the versions and either log it or have it in your paint and you will see the difference Oh it seems like you were right! I'm not sure what has changed, but it is suddenly working as you say! Thanks for the help guys! Edit: Perhaps the problem was not hitting refresh. Edited October 9, 2017 by ZX700 Quote Link to comment Share on other sites More sharing options...
Deceiver Posted October 9, 2017 Share Posted October 9, 2017 18 minutes ago, ZX700 said: Oh it seems like you were right! I'm not sure what has changed, but it is suddenly working as you say! Thanks for the help guys! Edit: Perhaps the problem was not hitting refresh. no problem =] Quote Link to comment Share on other sites More sharing options...
liverare Posted October 10, 2017 Share Posted October 10, 2017 (edited) 9 hours ago, Khaleesi said: In Eclipse I make it export the class files straight to the osbot script folder and everytime I hit save the files gets updated Maybe it does the same in intelliJ? Doeth thou use environment variablaroos? Edited October 10, 2017 by liverare Quote Link to comment Share on other sites More sharing options...
ZX700 Posted October 10, 2017 Author Share Posted October 10, 2017 19 minutes ago, liverare said: Doeth thou use environment variablaroos? Not from what I can work out. Quote Link to comment Share on other sites More sharing options...
liverare Posted October 10, 2017 Share Posted October 10, 2017 32 minutes ago, ZX700 said: Not from what I can work out. I did have a guide on how to set up Eclipse, but I can't find it. I'll probably write another up later. Quote Link to comment Share on other sites More sharing options...
ZX700 Posted October 10, 2017 Author Share Posted October 10, 2017 42 minutes ago, liverare said: I did have a guide on how to set up Eclipse, but I can't find it. I'll probably write another up later. It's okay, problem solved (although my understanding remains unclear), thanks anyway! Quote Link to comment Share on other sites More sharing options...