Error: unable to acces jarfile
Verfasst: Mittwoch 3. Mai 2017, 20:15
Hi leute,
ich habe unter Ubuntu 17.04 den Error, dass wenn ich folgendes Script ausühre, ich den oben beschriebenen Fehler erhalte:
[codebox=python file=Unbenannt.txt]from Tkinter import *
import os
def breakout():
os.system("java -jar data/src/breakout.jar")
def pong():
os.system("java -jar data/src/pong.jar")
def snake():
os.system("java -jar data/src/snake.jar")
def list():
breakout_btn_img.grid_forget()
pong_btn_img.grid_forget()
snake_btn_img.grid_forget()
list_btn.grid_forget()
image_btn.grid(row=0, column=0)
breakout_btn.grid(row=1, column=0)
pong_btn.grid(row=2, column=0)
snake_btn.grid(row=3, column=0)
def image():
breakout_btn.grid_forget()
pong_btn.grid_forget()
snake_btn.grid_forget()
image_btn.grid_forget()
list_btn.grid(row=0, column=0)
breakout_btn_img.grid(row=1, column=0)
pong_btn_img.grid(row=2, column=0)
snake_btn_img.grid(row=3, column=0)
root = Tk()
root.title("TheArcadeMachine")
root.resizable(False, False)
list_btn = Button(root, width=47, command=list, relief=SOLID, borderwidth=1, text="list mode")
breakout_img = PhotoImage(file="data/img/breakout.gif")
breakout_btn_img = Button(root, width=333, height=127, image=breakout_img, command=breakout, relief=FLAT)
breakout.image = breakout_img
pong_img = PhotoImage(file="data/img/pong.gif")
pong_btn_img = Button(root, width=333, height=127, image=pong_img, command=pong, relief=FLAT)
pong.image = pong_img
snake_img = PhotoImage(file="data/img/snake.gif")
snake_btn_img = Button(root, width=333, height=127, image=snake_img, command=snake, relief=FLAT)
snake.image = snake_img
image_btn = Button(root, width=47, command=image, relief=SOLID, borderwidth=1, text="picture mode")
breakout_btn = Button(root, width=47, command=breakout, relief=FLAT, text="Breakout", anchor=W, justify=LEFT)
pong_btn = Button(root, width=47, command=pong, relief=FLAT, text="Pong", anchor=W, justify=LEFT)
snake_btn = Button(root, width=47, command=snake, relief=FLAT, text="Snake", anchor=W, justify=LEFT)
list_btn.grid(row=0, column=0)
breakout_btn_img.grid(row=1, column=0)
pong_btn_img.grid(row=2, column=0)
snake_btn_img.grid(row=3, column=0)
root.mainloop()[/code]
ich habe bereits einen "executable Bit" gesetzt
ich habe unter Ubuntu 17.04 den Error, dass wenn ich folgendes Script ausühre, ich den oben beschriebenen Fehler erhalte:
[codebox=python file=Unbenannt.txt]from Tkinter import *
import os
def breakout():
os.system("java -jar data/src/breakout.jar")
def pong():
os.system("java -jar data/src/pong.jar")
def snake():
os.system("java -jar data/src/snake.jar")
def list():
breakout_btn_img.grid_forget()
pong_btn_img.grid_forget()
snake_btn_img.grid_forget()
list_btn.grid_forget()
image_btn.grid(row=0, column=0)
breakout_btn.grid(row=1, column=0)
pong_btn.grid(row=2, column=0)
snake_btn.grid(row=3, column=0)
def image():
breakout_btn.grid_forget()
pong_btn.grid_forget()
snake_btn.grid_forget()
image_btn.grid_forget()
list_btn.grid(row=0, column=0)
breakout_btn_img.grid(row=1, column=0)
pong_btn_img.grid(row=2, column=0)
snake_btn_img.grid(row=3, column=0)
root = Tk()
root.title("TheArcadeMachine")
root.resizable(False, False)
list_btn = Button(root, width=47, command=list, relief=SOLID, borderwidth=1, text="list mode")
breakout_img = PhotoImage(file="data/img/breakout.gif")
breakout_btn_img = Button(root, width=333, height=127, image=breakout_img, command=breakout, relief=FLAT)
breakout.image = breakout_img
pong_img = PhotoImage(file="data/img/pong.gif")
pong_btn_img = Button(root, width=333, height=127, image=pong_img, command=pong, relief=FLAT)
pong.image = pong_img
snake_img = PhotoImage(file="data/img/snake.gif")
snake_btn_img = Button(root, width=333, height=127, image=snake_img, command=snake, relief=FLAT)
snake.image = snake_img
image_btn = Button(root, width=47, command=image, relief=SOLID, borderwidth=1, text="picture mode")
breakout_btn = Button(root, width=47, command=breakout, relief=FLAT, text="Breakout", anchor=W, justify=LEFT)
pong_btn = Button(root, width=47, command=pong, relief=FLAT, text="Pong", anchor=W, justify=LEFT)
snake_btn = Button(root, width=47, command=snake, relief=FLAT, text="Snake", anchor=W, justify=LEFT)
list_btn.grid(row=0, column=0)
breakout_btn_img.grid(row=1, column=0)
pong_btn_img.grid(row=2, column=0)
snake_btn_img.grid(row=3, column=0)
root.mainloop()[/code]
ich habe bereits einen "executable Bit" gesetzt