469,300 Members | 2,165 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,300 developers. It's quick & easy.

Java Compiler Script on Mac

8 Nibble
I am trying to create a script that will automatically change the working directory to my Java code and then compile the code. I am able to change the directly to my path but I cannot figure out how to call the java compiler on the "filename" while taking the "filename" as an argument directly from the Terminal and i run this java code on the interviewbit online java compiler.

Expand|Select|Wrap|Line Numbers
  1.  #!/bin/bash
  2.     FILE = “$1”
  3.     open -a Terminal /Users/Jarvis/Desktop/Codes/Java/CS\ 49J/
  4.     javac “$FILE”
2 Weeks Ago #1
0 4892

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Andy Dalton | last post: by
4 posts views Thread by Mark A. Washburn | last post: by
1 post views Thread by Andrew Neiderer | last post: by
4 posts views Thread by 'Lil Laurry | last post: by
JavaStudent07
2 posts views Thread by JavaStudent07 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.