This content has been marked as final. Show 4 replies
Sounds like a typo in the .bat file. Try just getting rid of the extra .java.
Thank you for responding.
When I need to compile with Batch file (if my Batch file called mybat.bat - do I need to type
'mybat myfile.java' ?
I can see now that when I type mybat myfile.java - I end up with 2 .java.java at the end
but if I type only one - then I see only one .java extension but unfortunately my program still says
G:\myFolder\Java\projects>"C:\Program Files\java\jdk1.6.0_05\bin\javac.exe" -classp
ath classes -d classes G:/myFolder/Java/projects/src/java112/labs1/Lab1.java
The system cannot find the path specified.
Dude, I have no idea what you're talking about.
If you want to compile a java file for MyClass, you'll have a file MyClass.java with the source code in it, and you'll type
If you want to execute a batch file called MyBat.bat, you type
If that batch file is used to compile your java code, then it will contain a line that looks like the javac line above.
I suggest you forget batch files and start at the beginning and follow the directions exactly:
I would be glad to do it without batch files but our instructor likes them and requires us to use them.
I actually found some other solution for my question - I was not able to make my first example working. But found some working example and modified it.
Thank you for an effort anyway.