I downloaded the correct version of eclipse that will work on my linux machine from the website. The structure looks like this: eclipse/eclipse. I was in the eclipse folder, and I typed in eclipse in linux to start the IDE. It showed the error: eclipse command not found.
This is normal. For safety, the current directory is not part of the path used to find executables. Use ./eclipse to refer to the binary explicitly.
Related
I'm running a Gradle script that needs to exec a few commands. (In my example, it's node.)
In my Terminal, node is on my PATH, so I can type node --version and it just works. My Gradle script works fine on the command line.
But when I try to run the Gradle build in Android Studio, it says:
> A problem occurred starting process 'command 'node''
Cause: error=2, No such file or directory
Unfortunately, the way this script runs on various machines, I can't be sure what the path to node will be; I need to use the PATH environment from the user's machine. (On macOS, node might be in /usr/local/bin or /opt/homebrew/bin or ~/n/bin or something else entirely.)
How do I make this work?
EDIT: To clarify, our developers will launch Android Studio via the OS launcher, e.g. by double-clicking it in Finder on macOS, or from the Start menu in Windows.
My hunch would be that the PATH in Android Studio depends on how Android Studio is started. If I start it from a Linux shell, then it uses the same PATH which is set in that shell. If you use an OS-specific launcher, then I suppose the PATH depends on what this launcher used – which may be different from the one that you set explicitly/implicitly for your shell (e.g., in a ~/.bashrc file).
I doubt that you can get this to work reliably without manually making sure on all user machines that the PATH is always set correctly for Android Studio – or that you manually make sure that all node installations end up on the “most system-wide” PATH that is available for each OS installation.
I'm trying to set up my development environment for CapacitorJS on Arch Linux.
I followed the documentation and added
CAPACITOR_ANDROID_STUDIO_PATH=/usr/bin/android-studio
to my systems environment variables (not the project) but I'm still getting the same error
[error] Unable to launch Android Studio. Is it installed?
Attempted to open Android Studio at:
/usr/local/android-studio/bin/studio.sh
You can configure this with the CAPACITOR_ANDROID_STUDIO_PATH
environment variable.
Even though It's never pointed to /usr/local/android-studio/bin/studio.sh
I ran whereis android-studio and got android-studio: /usr/bin/android-studio, so I thought that would be the correct path, but every time I run npx cap open android it says it's trying it launch from the same path and never changes
It depends how you've installed it, for example Toolbox installs it inside the user's home directory.
nano ~/.bashrc
export CAPACITOR_ANDROID_STUDIO_PATH=~/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/bin/studio.sh
locate studio.sh might be able to find it, too.
I just installed Ubuntu and then downloaded a version of Java 7 and extracted it to where I want JAVA_HOME. I then added JAVA_HOME as an env var and exported it to PATH. I'm now trying to install Eclipse 4.2 (Juno) from the Older Versions link (specifically this).
When I download the TAR and extract it to where I want ECLIPSE_HOME to be, it extracts a directory named eclipse. When I drop into this directory, I see an executable also called eclipse. When I double-click this I get the following error:
Looking at this directory, I don't see a jre subdirectory - it's not even in the TAR that I downloaded from Eclipse's site. My understanding of Eclipse is that it always ships with its own JRE. What's going on here?
Update
Here's what I put in my ~/.bashrc file:
JAVA_HOME=/home/myuser/sandbox/java/7u55/jdk1.7.0_55
TOMCAT_HOME=/home/myuser/sandbox/tomcat/7.0.41/apache-tomcat-7.0.41
export PATH=$PATH:$JAVA_HOME/jre/bin:$TOMCAT_HOME/bin
I may have multiple questions here, but ultimately I'm trying to compile and run a Java program that references 3rd party JAR files (on Ubuntu Linux) so I thought it was appropriate to keep it to one question.
I'm trying to get Java JDK 7 properly installed and configured to run a simple program on Ubuntu Linux. I'd like to get instructions from an expert that can help me, at the very least, to run a simple Java program from the command line (perhaps a "Hello World" application?). I've only compiled and run Java programs on Windows in the past, so this is new to me. Last night, I read that you have to be careful of not installing the Open JDK, and to install the Oracle JDK. It appears that Ubuntu 11.10 installs Java Open JDK for you when the OS is installed, among others.
I'm running 32-bit Ubuntu, not 64-bit. So I downloaded this Linux JDK file:
jdk-7u4-linux-i586.tar.gz
I unpacked the tarball into /usr/java and then deleted the *.gz file to save disk space. Some tutorials say to install into /usr/java and some say to install into /usr/lib/jvm, so I just picked one and rolled with it. If you have a suggestion on the appropriate install directory, please let me know what you suggest.
I then checked what Java version was installed (below) with the "java -version" command. It did not find the Oracle JDK.
(1) Why didn't the command list the Oracle JDK package I just installed?
mac#UBUNTU:/usr/lib$ java -version
The program 'java' can be found in the following packages:
* gcj-4.4-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install <selected package>
mac#UBUNTU:/usr/lib$
(2) Can you help me with the steps necessary to configure this Linux machine to compile a Java program (finish what I just started)?
(3) Can you help me with the steps to compile a *.java file to create the *.class file?
(4) Can you help me run the Java program--the one we just compiled?
(5) Suppose I want to include multiple *.jar files (3rd party assemblies) in my Java program. How does Java know on Linux where to find these files if they are not in the directory running the Java program referencing them? (I'm only familiar with a CLASSPATH in Windows)
Ubuntu is based on Debian and its apt-get utility. apt-get will list only known packages. The one you installed is just a folder lying on your system and apt-get does not even know about it.
It looks like java is not on your path. So either you create a symbolic link to the java binary in one of the folders of your path (type env to see what's in your path variable), or you add the JDK bin directory to your path (see command export). As a last resort, you can type the absolute path to the java binary, but that's just painful.
To compile, you simply use javac (Java compiler). For example javac Test.java. Make sure that javac is also on your path (or use the absolute path to the java compiler)
To run it, type java -cp . Test (don't forget to type the fully qualified name of your class if you put it inside a package, which is recommended)
When you compile or when you run, use the argument -cp followed by the list of jars you want to use (separated by a ':' on Linux and by a ';' on Windows). You may use wildcards in your classpath (like lib/*.jar) but you may also have to escape the wildcard to avoid shell expansion (like this lib/\*.jar).
Can somebody tell me how to do this? Or, point me to a good link?
I want to install Jmeter but "./jmeter" tells me that:
Error: no server' JVM atC:\Program
Files\Java\jre1.6.0\bin\server\jvm.dll'.
So, I need to get the server JVM up and running.
I have been attempting to download and install the JDK from
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
And got a corrupted file error when I tried to install:
jdk-6u25-linux-ia64-rpm.bin
Should I be doing this via wget or apt-cyg? Or, how do i determine which installation
package I should be downloading from the oracle/sun downloads page?
Thanks in advance.
You are on Windows so you should try the Windows x86 version unless there is a particular reason why you want to do that with Cygwin. Or try this:
Copy 'server' folder from the JDK's JRE's bin folder (example: C:\Program Files\Java\jdk1.6.0\jre\bin\server)
Paste the 'server' folder to JRE's bin folder (example: C:\Program Files\Java\jre1.6.0\bin)
Cygwin aims for Linux source compatibility, but it does not provide Linux binary compatibility. This means that programs have to be built specifically for Cygwin and that Linux binaries such as the linux-ia64 JVM mentioned here will not run on Cygwin.
Perhaps it is possible to build the OpenJDK JVM for Cygwin, but it doesn't ship with Cygwin. The Cygwin Ports repository contains a package for the lightweight JamVM.
But in any case, JMeter was looking for the native Windows version of the JVM, so you probably just want to install that, as Jano already suggested.