0

I am trying to integrate MPJ Express in eclipse(Kepler) in Ubuntu 13.04

The environment variables defined in .bashrc are as follows:

export JAVA_HOME=/home/soumya/Work/jdk1.7.0_25
export PATH=$PATH:/home/soumya/Work/jdk1.7.0_25/bin    
export MPJ_HOME=/home/soumya/InstalledSoftwares/mpj-v0_38
export PATH=$PATH:$MPJ_HOME/bin

Problem 1: When I start Eclipse I get an error:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) 
must be available in order to run Eclipse. No Java virtual machine 
was found after searching the following locations: 
/home/soumya/Work/eclipse/jre/bin/java java 
in your current PATH

This was solved by copying the jre folder inside the Eclipse folder. So now Eclipse starts.

Problem 2: I can't seem to run a multicore program. In the run configurations of my Java project I have done the following:

  • Set a variable MPJ_HOME to /home/soumya/InstalledSoftwares/mpj-v0_38
  • Set environment variable MPJ_HOME to ${MPJ_HOME}
  • Set VM Arguments to -jar ${MPJ_HOME}/lib/starter.jar

But when I run the program, I get the following error:

MPJ Express (0.38) is started in the multicore configuration
java.io.IOException: Cannot run program "java" (in directory "/home/soumya/Work/EclipseWorkspace/SoftwareArchitectureProject/MulticoreDebuggerDemo"): error=2, No such file or directory

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at runtime.starter.MulticoreDaemon.startNewProcess(MulticoreDaemon.java:268)
at runtime.starter.MulticoreDaemon.<init>(MulticoreDaemon.java:109)
at runtime.starter.MPJRun.<init>(MPJRun.java:146)
at runtime.starter.MPJRun.main(MPJRun.java:964)

Caused by: java.io.IOException: error=2, No such file or directory

at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 4 more
Gerret
  • 2,948
  • 4
  • 18
  • 28
Soumya
  • 1,833
  • 5
  • 34
  • 45
  • 2
    This is a very wild guess, but it seems that "java" is not available for MPJ Express. Try typing "java" in a new terminal and see if it is available. If it is, try setting environment variable JAVA_HOME to your actual JDK Home (in Ubuntu e.g. `/usr/lib /jvm/`). – zip Aug 22 '13 at 05:28
  • Thanks Jason, Your comment seemed all that I needed to solve the problem. And yess, the problem was with JAVA. I had downloaded the tar file of Oracle Java, untarred it in home/soumya/Work/ and set the JAVA_HOME and PATH in bashrc according to this path. This was causing the problem. The proper way of installing ORACLE JAVA in ubuntu linux is provided in http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux. If installed properly the problem disappears. – Soumya Aug 22 '13 at 06:36
  • You are welcome, but my name is `zip`not `Jason`, although I would like that name ;) – zip Aug 22 '13 at 07:20

0 Answers0