I'm trying to just execute the java command and it's saying it cannot be found, even though it is there.
I have a list of file names as output of certain command.
I need to find each of these files in a given directory.
I tried following command:
ls -R /home/ABC/testDir/ | grep "\.java" | xargs find /home/ABC/someAnotherDir -iname
But it is giving me following error:
find: paths must precede expression: XYZ.java
What would be the right way to do it?
I am a newbie to linux. I am trying for a command which displays
pid, java class. I tried
ps -C java -o pid
but it only showed me pid but not java classes. I used another command
ps -ef | grep java"
It showed me full library JAR files and java classes associated with it.. But I don't need this.. I need only to display pid and java class.
javac and javaws work from the command line but java for running a .class won't work.
I have updated my PATH, set JAVA_HOME, and checked links.
When I type java myclass I get "java" found in default-jre and a few others. When I run java -version the same thing, "java" found in default-jre.
I'm trying to use Sun Java jdk1.7.0 and the command line.
Hi All,
I am trying to run a grep command which creates an output file.
Then I will run a java file which take that file and process that. My java file uses other java files and library jars.
I have tried below code but I am getting compilation error,it can not find other java files in same directory.
I am very much a newbie at Unix/Linux command line stuff, and mostly get to where I'm going by copying, pasting, and modifying code I find on the internet.
I was updating my .bash_profile, and unfortunetly I made a few updates and now I am getting:
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
-bash: tar: command not found
-bash: grep: command not found
-bash: cat: command not found
-bash: find: command not found
I'm trying to find all files that are of a certain type and do not contain a certain string. I am trying to go about it by piping find to grep -v
example:
find -type f -name '*.java' | xargs grep -v "something something"
This does not seem to work. It seems to be just returning all the files that the find command found.
I'm having a small problem. I've been trying to work Minecraft into working using Wine. Over the past few hours, I've been working with Java over and over (long story, I'll keep it relevant) and have finally come to an answer. I need to install Oracle Java, or Sun-JRE as more commonly known. I found this answer http://askubuntu.com/a/56119 and followed the instructions.