Git Product home page Git Product logo

Comments (7)

NeilFraser avatar NeilFraser commented on May 5, 2024

The source of this error is probably Windows using \ as a path separator, whereas the rest of the world uses /. Windows machines are rather difficult to obtain here at Google, so we don't explicitly support it for Blockly Games. Though we are happy to accept PRs that make life easier for Windows developers.

With respect to the Ubuntu error, can you give me greater context? Blockly Games doesn't have any Java code, but it does download and run the Closure Compiler, and some Closure Template utilities which use Java. More context would help determine which application is going wrong. Also running java -version at the command line would be helpful in knowing what's on your system.

from blockly-games.

fatihgurbuz avatar fatihgurbuz commented on May 5, 2024

java -version output:

java version "1.7.0_151"
OpenJDK Runtime Environment (IcedTea 2.6.11) (7u151-2.6.11-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.151-b01, mixed mode)

fatih@fatih-ubuntu:/media/sf_ubuntuBox/blockly-games-master$ make

...

java -jar third-party/closure-compiler.jar
--js appengine/third-party/JS-Interpreter/acorn.js
--js appengine/third-party/JS-Interpreter/interpreter.js
--js_output_file appengine/third-party/JS-Interpreter/compiled.js
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
make: *** [deps] Error 1

from blockly-games.

NeilFraser avatar NeilFraser commented on May 5, 2024

Thanks for the details. You are using Java 7 (from 2011), which is apparently incompatible with the pre-compiled version of Closure Compiler that Google provides. Your two options are:

  • Upgrade to Java 8 (known to work).
  • Download the sources for Closure Compiler from https://github.com/google/closure-compiler and attempt to build your own Jar file using Java 7. I don't know if Closure Compiler's sources are compatible with 7.

from blockly-games.

fatihgurbuz avatar fatihgurbuz commented on May 5, 2024

I've upgraded java to "Java SE Runtime Environment 8u144" with replacing old java folder to /usr/lib/jvm/jdk1.8.0_144/bin/java. So it fixed the unsupported major.minor error. But now i got this:

`fatih@fatih-ubuntu:/media/sf_ubuntuBox/blockly-games-master$ make

...

Exception in thread "main" com.google.template.soy.base.SoySyntaxException: Error opening Soy file appengine/{.: java.io.FileNotFoundException: appengine/{. (Operation not permitted)
at com.google.template.soy.base.SoySyntaxException.createWithoutMetaInfo(SoySyntaxException.java:52)
at com.google.template.soy.soyparse.SoyFileSetParser.parseSoyFileHelper(SoyFileSetParser.java:261)
at com.google.template.soy.soyparse.SoyFileSetParser.parseWithVersions(SoyFileSetParser.java:213)
at com.google.template.soy.soyparse.SoyFileSetParser.parse(SoyFileSetParser.java:173)
at com.google.template.soy.SoyFileSet.compileToJsSrcFiles(SoyFileSet.java:921)
at com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:307)
at com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:243)
Traceback (most recent call last):
File "i18n/json_to_js.py", line 252, in
main()
File "i18n/json_to_js.py", line 239, in main
'--srcs', args.template])
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['java', '-jar', 'third-party/SoyToJsSrcCompiler.jar', '--locales', 'ab,ace,af,ar,arz,ast,az,ba,be-tarask,be,bg,bn,br,ca,cdo,cs,da,de,diq,el,en,eo,es,et,eu,fa,fi,fo,fr,frr,gl,gn,hak,he,hi,hrx,hu,ia,id,is,it,ja,ka,kab,kbd-cyrl,km,ko,ksh,ku-latn,ky,la,lb,lki,lrc,lt,lv,mg,mk,ml,mr,ms,my,mzn,nb,ne,nl,oc,pa,pl,pms,ps,pt-br,pt,ro,ru,sc,sco,sd,si,sk,sl,sr,sv,sw,ta,tcy,te,th,tr,uk,vi,zh-hans,zh-hant', '--shouldProvideRequireSoyNamespaces', '--isUsingIjData', '--messageFilePathFormat', 'appengine/{./,index,puzzle,maze,bird,turtle,movie,pond/docs,pond,pond/tutor,pond/duck}/generated/{LOCALE}.xlf', '--outputPathFormat', 'appengine/{./,index,puzzle,maze,bird,turtle,movie,pond/docs,pond,pond/tutor,pond/duck}/generated/{LOCALE}/soy.js', '--srcs', 'appengine/{./,index,puzzle,maze,bird,turtle,movie,pond/docs,pond,pond/tutor,pond/duck}/template.soy']' returned non-zero exit status 1
make: *** [languages] Error 1
fatih@fatih-ubuntu:/media/sf_ubuntuBox/blockly-games-master$`

from blockly-games.

NeilFraser avatar NeilFraser commented on May 5, 2024

Congratulations on getting past the Closure Compiler issue. Now it's got an issue while calling the Closure Templates (aka 'soy'). Try this from your command line:

ls {./,./}

It should print out the current directory twice. We use brace expansion to make the paths more manageable.

I expect that the above will work fine on your command line, since Ubuntu really shouldn't have a problem with that. But never-the-less, the braces are failing to be expanded by the Python call and are being passed literally to Java which (correctly) blows up. In i18n/json_to_js.py line 239 try adding an extra parameter:

-  '--srcs', args.template])
+  '--srcs', args.template], shell=True)

from blockly-games.

fatihgurbuz avatar fatihgurbuz commented on May 5, 2024

i've succeeded to build it but i have one last question before issue is closed.

so i've built it but under server adaptation, when user choose for example maze it redirects to /maze.html. it succeeds on local(if i run appengine/index.html without running server) but if i enter to localhost/... it doesn't because there is no physical html file in maze folder. could we create it by make maze-en or maze.html must be created dynamically when user chooses the maze.html? how can we create independent maze.html in appengine/maze folder?

from blockly-games.

NeilFraser avatar NeilFraser commented on May 5, 2024

Take a look at app.yaml:
https://github.com/google/blockly-games/blob/master/appengine/app.yaml
That's the file on App Engine that handles path routing. You'll want to recreate some of this for your hosting platform.

Basically, when the user requests /maze, the server should return the contents of the static file appengine/maze.html

from blockly-games.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.