I am able to run my Jasmin tests in Karma using the karma command line and maven command line, but when trying to run maven (eg. mvn install) from within STS 3.2.0.RELEASE (Eclipse Juno 4.2) I get the following error:
Failed to execute goal com.kelveden:maven-karma-plugin:1.2:start (default) on project store-webapp: There was an error executing Karma. Cannot run program "karma": error=2, No such file or directory -> [Help 1]
It's as if when Eclipse shells maven, it does not have /usr/local/bin in the path. Is there a way to configure the path eclipse uses when invoking maven?
My environment is:
Mac OSX 10.8.4
STS 3.2.0.RELEASE (Eclipse Juno 4.2)
maven-karma-plugin 1.2
karma 0.8.6 (installed globally via npm
install -g karma)
Node.js 0.10.12 (installed using the OSX package)
Jean
It appears in Mac OS X 10.8 (and possible earlier), GUI apps do not get the same path as the terminal. To add /usr/local/bin to the global path, you need to edit (and possibly create) /etc/launchd.conf to include setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin You must edit/create this file with admin privs so use sudo with vi or nano sudo nano /etc/launchd.conf You will need to reboot your Mac before this change can take effect. This information was found on ServerFault https://serverfault.com/questions/16355/how-to-set-global-path-on-os-x/277034#277034
Related
I am trying to use Eclipse CDT under Ubuntu 18.04 LTS.
I get the same error as many others, but I could not find a solution in what I read.
I try to launch with
$ eclipse &
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
and I get
/home/user1/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1551271296090.log
When checking /usr/lib/eclipse/configuration/config.ini (as per this) I found the following lines (among others)
osgi.framework=file\:plugins/org.eclipse.osgi_3.8.1.dist.jar
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar#1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
As for the first two lines, I have files
$ locate eclipse.osgi_
/usr/share/java/org.eclipse.osgi_3.8.1.dist.jar
$ locate simpleconfigurator_1
/usr/lib/eclipse/plugins/org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar
Nevertheless:
/usr/share/java/org.eclipse.osgi_3.8.1.dist.jar seems to belong to no package (a remnant of some old package?), since
$ apt-file search /usr/share/java/org.eclipse.osgi_3.8.1.dist.jar
gives no results.
I have ver 3.9.1
$ dpkg -l | grep libequinox-osgi-java
ii libequinox-osgi-java 3.9.1-1 all Equinox OSGi framework
$ dpkg -L libequinox-osgi-java
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libequinox-osgi-java
/usr/share/doc/libequinox-osgi-java/changelog.Debian.gz
/usr/share/doc/libequinox-osgi-java/copyright
/usr/share/java
/usr/share/java/org.eclipse.osgi-3.9.1.jar
/usr/share/maven-repo
/usr/share/maven-repo/org
/usr/share/maven-repo/org/eclipse
/usr/share/maven-repo/org/eclipse/osgi
/usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi
/usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1
/usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1/org.eclipse.osgi-3.9.1.pom
/usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian
/usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian/org.eclipse.osgi-debian.pom
/usr/share/java/org.eclipse.osgi.jar
/usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1/org.eclipse.osgi-3.9.1.jar
/usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian/org.eclipse.osgi-debian.jar
So I do not know if the problem is here.
How can I solve this?
Could not find an answer here
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891956
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898086
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/1754886
https://ubuntu.pkgs.org/16.04/ubuntu-universe-i386/libequinox-osgi-java_3.8.1-8_all.deb.html
https://askubuntu.com/questions/1031171/eclipse-doesnt-start-on-ubuntu-18-04
You are probably using an older Eclipse version that does not work with Java 9 or higher:
If using Java 9 or newer please use Eclipse 4.7.1a or newer as it contains fixes in Eclipse launcher to add all JVM modules.
Do one of the following to solve the problem:
Use Java 8 to run Eclipse (a JRE/JDK can be put in the subfolder jre of your Eclipse installation or be specified in the eclipse.ini file)
Upgrade Eclipse (recommended).
I am using Eclipse on a macOS machine. CMake is present on my machine at /usr/local/bin/cmake and has been installed using Homebrew. Eclipse is at the latest version (2018-09).
I have the following target in a Makefile, which has been set up and is visible from Eclipse:
all:
./configure
Rscript -e "Rcpp::compileAttributes()"
R CMD INSTALL --no-multiarch --with-keep.source .
Inside the configure file, there is this code:
cd src/build;cmake ..
However, when I double click the all target in Eclipse, I get the following message:
make all
./configure
./configure: line 1: cmake: command not found
make: *** [all] Error 127
I remember that some time ago this target worked out of the box on macOS. I can also launch CMake from a terminal without any trouble.
echo $PATH shows different behaviour:
If called from a standard macOS terminal, it yields /usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
If called from a TM Terminal inside Eclipse, it yields /usr/bin:/bin:/usr/sbin:/sbin
What is the most canonical way to have Eclipse detect my CMake installation ?
For macOS High Sierra 10.13.6, the solution provided here works. This must be performed to see the changes immediately.
Complete error message:
The JDK is missing and is required to run some NetBeans modules
Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/FaqRunningOnJre for more information.
Some details: I just installed Netbeans on Linux mint for the first time and when I start it when its turning on modules this error message appears. But I do have jdk installed.
$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
$ javac -version
javac 1.8.0_66
Find the file [netbeans installation directory]/etc/netbeans.conf
Luckily, Linux has a find helper like
find /home/ -name "netbeans.conf,
in which you can change the /home/ to a location where you want to search.
I found it at /usr/local/netbeans-8.1/etc/netbeans.conf
Once, you found the file, the following property needs to be set:
netbeans_jdkhome="[jdk_path]"
where you can find the jdk_path using:
update-alternatives --config java
In my case, I found it at /opt/java/jdk1.8.0_191
[Solved] For Mac OSX 10.11 (El Capitan).
Solution may be similar for other Unix-based systems.
The problem may have occurred because I inadvertently installed the jre
prior to installing the jdk. I uninstalled the jre, installed the jdk
and reinstalled NetBeans but the problem (popup window) remained.
However, the fix was fairly simple.
1. Make sure NetBeans is not running.
2. Make sure the jdk is installed.
3. Determine the location of the jdk:
The jdk location can be determined by entering the following (in Terminal):
$ /usr/libexec/java_home
For my system, the output was:
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
4. Edit the NetBeans configuration file to indicate the location of the jdk.
Near the bottom of this Netbeans configuration file (or equivalent for your NetBeans version):
/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
Comment out the following line (insert a # before the first character):
#netbeans_jdkhome="/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/bin/jre"
Then, add the following line (or equivalent for your jdk version):
netbeans_jkdhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home"
Then, save and exit the editor.
5. Start NetBeans (no more popup window indicating that the jdk is missing).
When netbeans has problems trying to find the path of the jdk, it's mainly because the version of the jdk does not match. Open the file C:\Program Files\NetBeans 8.2\etc\netbeans.conf, and verify that netbeans_jdkhome = "C:\Program Files\Java\jdk1.8.0_111".
Open netbeans.conf
sudo nano "/usr/lib/jvm/java-8-oracle/netbeans.conf"
Set proper sdk path:
netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
Exit Ctrl + X and to save changes Ctrl + T
This error showed up when I updated the Mac to Mojave. To fix, I edited the netbeans.conf file with the current jdk by using Terminal to find the correct jdk. Type
/usr/libexec/java_home -V
Here was my output.
Matching Java Virtual Machines (4):
1.8.311.11 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_131 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
1.8.0_25 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
1.7.0_79 (x86_64) "Oracle Corporation" - "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
Entering the first jdk listed did not work.
I edited the conf file with the second one listed:
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home"
Restarted Netbeans. That fixed it.
This worked for me
1. install full JDK
2. either edit <netbeans-IDE-installation>/etc/netbeans.conf
2.1 unmark netbeans_jdkhome
2.2 link to JDK location e.g. /usr/local/share/java/jdk1.6.0_07/
3. or use --jdkhome command-line option e.g. ./bin/netbeans --jdkhome /usr/local/share/java/jdk1.6.0_07/
take care with the "/" at the end
More info in http://wiki.netbeans.org/FaqRunningOnJre
Ubuntu 16.04 LTS:
Uninstall the netbeans you have.
Delete .cache/netbeans folder
Download http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html
Install your download
I have this problem to. But now i resolove this problem with edit one line.
Find and open this file /etc/netbeans.conf
If you see netbeans_jdkhome="C:\Program Files\Java\jre1.8.0_151" replace netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_131"
Save as adminstrator
Problem reseloved
In mid April 2019, Oracle has changed the JDK's licence. However, I was still able to solve this issue with NetBeans 11 and the JDK 12's open source build on my Windows machine. Just downloaded the open source JDK from https://jdk.java.net/ and extracted it. Then, in my NetBeans config file, I typed in the path to the extracted directory (NOT the "bin" folder!).
I resolved this problem by changing default version of JRE and JDK that I'm using to 11.x.x with following commands:
sudo update-alternatives --config java
sudo update-alternatives --config javac
I am working on Ubuntu 14.04 LTS and I would like to install eclipse 4.4. I did everything step by step with this site:
http://tutorialforlinux.com/2014/03/13/how-to-install-eclipse-4-3-kepler-standard-on-ubuntu-12-04-precise-lts-3264bit-linux-easy-visual-guide/
Now it is what I got after step 6 when I try to start eclipse:
zaba#zaba:~$ ls /opt/eclipse/
about_files configuration eclipse.ini icon.xpm
plugins about.html dropins
epl-v10.html notice.html readme artifacts.xml
eclipse features p2
zaba#zaba:~$ ls /usr/local/bin/
eclipse
zaba#zaba:~$ eclipse
bash: /usr/local/bin/eclipse: no such file or directory
zaba#zaba:~$
As you can see teoretically everything is on its place: 'eclipse' file in /opt/eclipse and its link in /usr/local/bin - I made it as in tutorial, by:
ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse
But it does not work. Can anyone help, please?
since "A third-party application in /opt is supposed to be self-contained"
it should run through
/opt/eclipse/eclipse
if it does not, there is a problem either with your user or the executable, try just copying it to ~/bin
You might have a mismatch on 64-bit and 32-bit in your operating system and eclipse version.
I am a beginner to OfBiz framework.I downloded ant.zip and apache-ofbiz-09.04.01.zip and unpacked to a directory and I have set path variable Ant_Home also and tried with some command line commands found in the tutorial available in the Internet. I tried a lot of tutorials to combine the OfBiz and the eclipse but I could not succeed in that.Can anyone say the step by step clear procedure for doing this correctly...Thank You.
Ant installation is not necessary to run Ofbiz, since its an inbuilt feature in the framework,
First load the project in to eclipse (New -->Java Project -->Select Project location)
Build the project (Right click build.xml run as Ant Build)
then follow the steps in the link below
https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-debuggingInEclipse
just follow this link https://github.com/pashtika/OFBiz
Or
The following are the steps to setup / configure Apache OFBiz 13.07.01 in Eclipse / STS (Spring Tool Suite) are as follows -
• Select OFBiz (or ofbiz-release13.07) project, right-click on it -> Run As -> Run ... (alike for Debug)
• Select Java Application and click on New
• Set Run configuration name to OFBiz
o Main tab:
*************
- Project: OFBiz
- Main class: org.ofbiz.base.start.Start
- If you need it (to trace a framework bug in the 1st loaded class) you may use the "Stop in Main" Option
o Arguments:
- VM arguments: -Xms(minValue)M -Xmx(maxValue)M (typically minValue = 128, maxValue = 512, more is better of course) (Ex: -Xms128M -Xmx512M)
• In some case (Suse SL 10.1 at least) it's better to not define any VM arguments but let the defaults values.
- Working directory: Use default working directory
• Classpath
o Bootstrap Entries: JRE System Library
o User Entries: ofbiz.jar from OFBiz project
- Don't forget to remove the entry "ofbiz (default classpath)" else you may have a message "Can't find bundle for base name cache, locale ..."
• Source tab
******************
o Click Add Projects... (buttons on the right)
o Select the ofbiz project
• Environment
******************
o Add environment variable LC_ALL=C (Optional, Linux only)
• Click on Apply and Run (or Debug)
Here is with your final screen you can see:-
Flowing Answer appropriate For Ubuntu OS only.........!
Step 1: After downloading the jdk file open the terminal Ctrl + Alt + T for navigate to the file. *
*(you can use sudo apt-get install nautilus-open-terminal for open Terminal in Any location)*
tar -xf jdk-7u75-linux-i586.tar.gz
This will extract and create a jdk folder at your current path.
Step 2: Create a location to keep your new JDK . I prefer and usually use /usr/lib/jvm/
You may need root permission to create the /usr/lib/jvm (hence use sudo).
sudo mkdir /usr/lib/jvm
Step 3: Move the extracted jdk folder to /usr/lib/jvm/
sudo mv jdk1.7.0_75 /usr/lib/jvm/
Step 4: Now we have to setup our system to use refer to our new jdk
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_75/bin/java" 1
sudo update-alternatives --config java
And also register Firefox Java Plugin
sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so"
"mozilla-javaplugin.so" "/usr/lib/jvm/jdk1.7.0_75/jre/lib/amd64/libnpjp2.so" 1
sudo update-alternatives --config mozilla-javaplugin.so
ALL DONE. You can test your java install by java -version
Then Same way for Apache ant:
sudo update-alternatives --install "/usr/bin/ant" "ant" "/usr/lib/jvm/apache-ant-1.9.2/bin/ant" 1
sudo update-alternatives --config ant
You can test your ant install by ant -version
Then Set Path: For java path setup go to terminal & type: sudo nano /etc/environment
JAVA_HOME="/usr/lib/jvm/jdk1.7.0_75"
ANT_HOME="/usr/lib/jvm/apache-ant-1.9.2"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk1.7.0_75/bin:/usr/lib/jvm/apache-ant-1.9.2/bin"
Step 5: After installing Apache OFBiz, Use following command to start Apache OFBiz service on system:
Go to The OfBiz Folder Directory & open TERMINAL Then type the following Command:
sudo ant clean-all
sudo ant load-demo
sudo ant load-extseed // this is not mendotory; it is used for changes of Entity
sudo ant start // This will Start Apache OFBiz Service
Step 6: Access Apache OFBiz in Browser
Access Apache OFBiz in browser on port 8443 as below given url and login credentials.
URL: https://localhost:8443/humanres/control/main
Admin Username: admin
Admin Password: ofbiz
Thats All Done...................!