Skip to content

Commit

Permalink
Fix java example
Browse files Browse the repository at this point in the history
Using -cp flag to define the classpath for the source used in Django.

Signed-off-by: Jesús Castro <[email protected]>
  • Loading branch information
jcstr committed Jun 26, 2020
1 parent f09a9b2 commit de7fa47
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified matefacil/matefacil_demo/Programs/HelloWorld.class
Binary file not shown.
2 changes: 1 addition & 1 deletion matefacil/matefacil_demo/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def resJav(request):
a1 = m1.replace("'", "")
a2 = m2.replace("'", "")
msj = f'{a1}{a2}\n'.encode('utf-8')
p = subprocess.Popen([f'java matefacil_demo/Programs/HelloWorld {a1} {a2}'], stdout=subprocess.PIPE, shell = True)
p = subprocess.Popen([f'java -cp matefacil_demo/Programs HelloWorld {a1} {a2}'], stdout=subprocess.PIPE, shell = True)
s = p.communicate(msj)[0].decode('utf-8')
return HttpResponse(s)

Expand Down

0 comments on commit de7fa47

Please sign in to comment.