Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need help with compiling stuff in java.

My friend has written a program. It runs on linux just fine. He thought that the linux script might run on mac. I thought it might to. So i tried it. Nope it gives me back an error. Wich i have no clue wich it says or how to fix it. Im se to using exlipse for compiling stuff. All help would be appricated.

the script:
echo Compiling Randoms   javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar:././plugins Randoms/*.java echo Compiling Scripts javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar:././plugins Scripts/*.java echo Compiling iScar PLugins javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar iscarplugins/*.java echo Compiling Plugins javac -cp .:././jars/impsoft.jar:././jars/swt.jar:././jars/jython.jar plugins/*.java 


the error

kevin-roses-computer:~/Desktop/nexus kevinrose$ ./compile.shCompiling Randoms javac: invalid flag: Randoms/*.java Usage: javac <options> <source files> use -help for a list of possible options Compiling Scripts javac: invalid flag: Scripts/*.java Usage: javac <options> <source files> use -help for a list of possible options Compiling iScar PLugins javac: invalid flag: iscarplugins/*.java Usage: javac <options> <source files> use -help for a list of possible options Compiling Plugins error: error reading plugins/*.java; plugins/*.java (No such file or directory) 1 error kevin-roses-computer:~/Desktop/nexus kevinrose$ 


MacBook Mac OS X (10.4.9) Java is 1.6.0_ad

Posted on May 25, 2007 10:54 PM

Reply
4 replies

May 26, 2007 6:49 AM in response to KevinRrosse27

I think this might be due to having the wrong type of line endings in the shell script file. I'd try opening a new empty file in TextEdit, then cutting and pasting each line from the shell script into the new empty file. When you've done this, save the file with a .sh extension. You might need to issue chmod command to give it execute permission (eg. chmod 777 newcommandfile.sh) before you can run it.

Bob

Need help with compiling stuff in java.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.