Java error

I’m getting this error when trying to upload a program.

java.io.IOException: Cannot run program "hardware/tools/avrdude": java.io.IOException: error=13, Permission denied
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
      at java.lang.Runtime.exec(Runtime.java:593)
      at java.lang.Runtime.exec(Runtime.java:466)
      at processing.app.Uploader.executeUploadCommand(Uploader.java:123)
      at processing.app.AvrdudeUploader.avrdude(AvrdudeUploader.java:170)
      at processing.app.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:76)
      at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:48)
      at processing.app.Sketch.upload(Sketch.java:1632)
      at processing.app.Sketch.exportApplet(Sketch.java:1701)
      at processing.app.Editor$42.run(Editor.java:2016)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
      at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
      ... 17 more

Turns out avrdude wasn't marked to run as an application. Marked that and everything ran fine.