I have run the same command under windows using the windows Java Development Kit and it worked.Now i try to run it ubuntu and i get this error.Please help
-
You'll need the linux SDK; the Windows SDK won't work on Linux. – Elliott Frisch Mar 27 '16 at 01:45
-
I have already installed the jdk within terminal – Tasos Barlas Mar 27 '16 at 01:48
-
`dist_windows_x86_64` is not going to work on Linux. – Elliott Frisch Mar 27 '16 at 01:49
-
i still get the same error after downloading the linux version.. – Tasos Barlas Mar 27 '16 at 01:54
-
Please don't post your shell output as screen shots. Cut-and-paste the text into the question.. – Stephen C Mar 27 '16 at 10:44
2 Answers
Different OS have different dist package manager, you try to install Java environment in your Linux system by below Reference

- 1,688
- 2
- 20
- 30
-
My jdk is already installed and working.thats not where the issue is – Tasos Barlas Mar 27 '16 at 02:20
It looks like you are specifying the -cp
argument incorrectly.
On Linux, the path separator character is ":"
not ";"
. The ";"
character separates commands on the command line, assuming that you are using bash or similar as your shell.
It looks like your command has been interpreted as two commands:
$ javac -g -cp ../dist_windows_x86_64/something
$ . GPUGalaxySim.java
The javac
command fails because there are no source filenames on that command line ... just like the error message says.
Then the second command:
The dot command (
"."
) is a built-in shell command that "sources" a file and attempts to interpret it as shell commands.If you attempt to "source" a file that is actually Java source code, you get nonsense error messages, basically because the shell has no clue what Java code means.

- 698,415
- 94
- 811
- 1,216
-
Thank you.By following your corrections I did manage to compile the files.Now.however,I am getting this error: SEVERE: Check your environment. Failed to load aparapi native library aparapi_x86_64 or possibly failed to locate opencl native library (opencl.dll/opencl.so). Ensure that both are in your PATH (windows) or in LD_LIBRARY_PATH (linux). Exception in thread "main" java.lang.NullPointerException at GPUGalaxySim.main(GPUGalaxySim.java:53) – Tasos Barlas Mar 27 '16 at 11:40