How to Fix Javac Invalid Flag Error?

I am trying to compile a an STK applet.

Firstly, I would like to compile the .java class by using javac. I am getting an error (invalid flag); this is my command:

C:\Program Files (x86)\Java\jdk1.8.0_20\bin>javac C:\Users\user\Desktop\ImsiManager Applet\2014-07-34_ImsiManager_src\2014-07-34_ImsiManager_src\ImsiManager\src\main\java\com\simulity\javacard\imsimanager\ImsiManager.java
Javac: invalid flag: C:\Users\user\Desktop\ImsiManager
Usage: javac <options> <source files>
use -help for a list of possible options

1 Answer

The problem are the spaces, you should enclose it with quotes:

javac "C:\Users\user\Desktop\ImsiManager Applet\2014-07-34_ImsiManager_src\2014-07-34_ImsiManager_src\ImsiManager\src\main\java\com\simulity\javacard\imsimanager\ImsiManager.java"
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest