This is a sequel to my other question, Getting Java programs start without calling with Java. I can already start Java programs from the terminal by just setting them executable and calling the X.class file. Now I'm thinking how nice it would be to put my Java apps next to my scripts in my ~/bin and having them handy from the terminal by their name without the ugly .class suffix. What's that for anyhow?

Is there no mode to compile to suffixless files and then run them so?

I'm using:

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
javac 1.8.0_101

Your Answer

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

Browse other questions tagged or ask your own question.