-1

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

enter image description here

2 Answers2

0

Different OS have different dist package manager, you try to install Java environment in your Linux system by below Reference

Zahidur Rahman
  • 1,688
  • 2
  • 20
  • 30
0

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.

Stephen C
  • 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