This site requires JavaScript, please enable it in your browser!
Greenfoot back
Roshan123
Roshan123 wrote ...

2021/12/28

Preventing website to compile a class

Roshan123 Roshan123

2021/12/28

#
Is it possible to stop the website to convert one specified class to JavaScript?
danpost danpost

2021/12/28

#
Roshan123 wrote...
Is it possible to stop the website to convert one specified class to JavaScript?
If the class is linked in any way with any other class in your project, you cannot get away with not having it converted. If it is not linked in any way, you could rename the ".JAVA" file of the class with another extension. However, if it is not linked, why would the class be there in your project to begin with? So, the short answer is probably "No."
Roshan123 Roshan123

2021/12/28

#
Can u just modify Saver class from this scenario, so that it will work nearly or exactly the same or just tell me that is the below guess correct or it's causes due to something else I don't know why it says no HTML5 conversion is available (i think it's due to the old packages which i imported...not sure though). And Plz don't post the code here.... If u modified a lot, then only u may post the code else only tell me which line u changed and what have u changed
danpost danpost

2021/12/28

#
Roshan123 wrote...
I don't know why it says no HTML5 conversion is available
Oh, that is what you mean. That could be caused by a couple of things. Using any part of either java.awt or javax.swing packages will stop it from converting.
Roshan123 Roshan123

2021/12/29

#
ok, I used both the packages....but one more question, can the same mechanism be created without using those packages or any code like thread.sleep(100000000) in Saver class which may delay it to compile those codes in Saver class(just a guess)
danpost danpost

2021/12/29

#
Roshan123 wrote...
ok, I used both the packages....but one more question, can the same mechanism be created without using those packages or any code like thread.sleep(100000000) in Saver class which may delay it to compile those codes in Saver class(just a guess)
What exactly are you trying to do? There is probably a way to have the Saver class compile and then just have it do what you want at some later time.
Roshan123 Roshan123

2021/12/29

#
I just want to show how my scenario works, but the packages in Saver class is preventing it to show it in website. So I m thinking that any method which will only delay the compilation in Saver class only or any other method which will work without awt and swing package and it will behave as same as the before one. Hope u understand what i mean to say
danpost danpost

2021/12/29

#
Roshan123 wrote...
I just want to show how my scenario works, but the packages in Saver class is preventing it to show it in website. So I m thinking that any method which will only delay the compilation in Saver class only or any other method which will work without awt and swing package and it will behave as same as the before one. Hope u understand what i mean to say
Well, for one thing, you cannot write to a file on the website for security reasons. So, I guess the best you could do with that class is to comment out the method and the importing of java.awt.BufferedImage. I do not see where javax.swing is being used. So, I cannot help there.
You need to login to post a reply.