Export project and javascript mode didnt work.

Hi everyone, First, good job for your work, I often came here to read post about problems I experienced, you are quite usefull indeed !

I have a problem with a project of mine. The project works perfectly fine since weeks in Java Mode, and I decide to go into the JavaScript mode for later use of my program. When I launch it, I got the following message :

Exception in thread "Processing.BasicServer" java.lang.NoSuchMethodError: processing.app.Base.showWarning(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V at de.bezier.mode.javascript.JavaScriptBuild.build(Unknown Source) at de.bezier.mode.javascript.JavaScriptBuild.export(Unknown Source) at de.bezier.mode.javascript.JavaScriptMode.handleExport(Unknown Source) at de.bezier.mode.javascript.JavaScriptEditor.handleExport(Unknown Source) at de.bezier.mode.javascript.JavaScriptEditor.serverStarted(Unknown Source) at de.bezier.mode.javascript.BasicServer.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

And the webpage do not load. I've read that the most commun reason of this is the usage of "displayWidth"/"displayHeight" in the code... but I didn't use them.

I've also tried to simply EXPORT my project (to a windows 8 .exe file). The generation of the diverses files works without error. However when I try to launche the .exe file, i've got just a white screen (the size is correct however), even a folder is created at some point in my program, so apparently some PARTS of the program worked, but its like 1% of it, with no warning/error message. Once again I read a few post about it, and I do copy some Police files (Arial mostly), and DO NOT use some library...

To conclude, I have two question : - Can someone explain me what is the problem in the JavaScript mode ? - More importantly, why I cant export successfully a working java projet into a .exe file without a single explanation ?

Sorry for the long post, and also for my bad english.

Have a good day

Tagged:

Answers

  • edited September 2015

    I found a part of the problem with the compilation. By removing parts of my programs steps by steps, my conclusion is that the use of a single image bug my program. I realized that I simply miss to add the img files to the same folder as the NEW file .exe My bad for that part. But the problem with javascript is still the same. Any way to find out what's happened ? Some kind of trace ?

  • Hit F12 in the browser and check console output. If an image resource isn't loading you'll see an error (in Chrome at least) and you usually see other types of error output here also...

    I remember seeing some odd output in Processing when running JS mode, but since my sketches were running fine in the browser I ignored them; so possibly your problem is elsewhere...

  • Thanks for your answer. I've found my problem. Apparently in javascript mode, the problem is that it doesnt find the PImage I try to load (using loadImage) in my code. In Java its okay, they are mostly in the current folder, but in Javascript i've no idea where (and how) I am supposed to copy the concerned files.

    I have read somewhere that I am supposed to use /* @pjs preload="myimage.jpg"; */ to preload the pictures but apparently that's not enough.

    Any idea ?

Sign In or Register to comment.