Unix/Linux Go Back    

How to compile and run java in UNIX?

UNIX for Dummies Questions & Answers

Kindly Note - This is a Single User Post by Forum Member Yoda Regarding:
How to compile and run java in UNIX?.
Please Follow The Primary Link Above to View the Full Discussion.

Old Unix and Linux 12-06-2012   -   Original Discussion by ak3141
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
Join Date: Jan 2012
Last Activity: 16 March 2018, 7:13 PM EDT
Location: Galactic Empire
Posts: 3,663
Thanks: 257
Thanked 1,329 Times in 1,245 Posts
You have to add the absolute path of javac to PATH env variable.

export PATH="$PATH:/your_javac_path_here/"

Or try running like below once you are in bin directory:-

./javac Example.java