Sublime Forum

Setting up Sublime text for java Programming

#1

Hello Friends Iam Having Trouble to build some java code with sublime text
When I use the Javac Build System Then iam Getting Error like this in the terminal

“bash: javac: command not found
[Finished in 0.1s with exit code 127]
[shell_cmd: javac “/home/vinays/Documents/HelloWorld.java”]
[dir: /home/vinays/Documents]
[path: /app/utils/bin:/app/sublime_merge/bin:/app/bin:/usr/bin]”

Then I had Made myself a new Build System like this:
}
“shell_cmd”: “java $file_name”,
“working_dir”: “${project_path:${folder}}”,
“path”: “/usr/bin/java”
}

Again It went wrong and showing:

/usr/bin/env: ‘bash’: No such file or directory
[Finished in 0.0s with exit code 127]
[shell_cmd: java HelloWorld.java]
[dir: /home/vinays/Documents]
[path: /app/utils/bin:/app/sublime_merge/bin:/app/bin:/usr/bin]

Kindly please look into This and Help Me out.

0 Likes

#2

Do you have a Java compiler installed?

0 Likes

#3

yes Sir,
$ java --version
openjdk 13.0.4 2020-07-14
OpenJDK Runtime Environment (build 13.0.4+8-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 13.0.4+8-Ubuntu-120.04, mixed mode)

0 Likes

#4

That’s the java runtime, you’ll want to check javac --version to see if the compiler is installed.

0 Likes

#5

Its Showing like this Sir:
$ javac --version
javac: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

0 Likes

#6

I answered your SO version of the question as below. Note however that your error above (not present in the SO question) indicates that your JDK installation is broken. You’re going to have to fix that before anything will work, but that’s not a Sublime Text problem.

0 Likes

#7

Iam Not understood Sir What You were saying
Can i get it properly

0 Likes