Skip to content

Commit de7fa47

Browse files
committed
Fix java example
Using -cp flag to define the classpath for the source used in Django. Signed-off-by: Jesús Castro <x51v4n@gmail.com>
1 parent f09a9b2 commit de7fa47

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed
22 Bytes
Binary file not shown.

matefacil/matefacil_demo/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def resJav(request):
3232
a1 = m1.replace("'", "")
3333
a2 = m2.replace("'", "")
3434
msj = f'{a1}{a2}\n'.encode('utf-8')
35-
p = subprocess.Popen([f'java matefacil_demo/Programs/HelloWorld {a1} {a2}'], stdout=subprocess.PIPE, shell = True)
35+
p = subprocess.Popen([f'java -cp matefacil_demo/Programs HelloWorld {a1} {a2}'], stdout=subprocess.PIPE, shell = True)
3636
s = p.communicate(msj)[0].decode('utf-8')
3737
return HttpResponse(s)
3838

0 commit comments

Comments
 (0)