Unable to Run the .java file

+1 vote

I am unable to Run the .java file have code to insert update the Hbase

What I did
1. We copied the test.java file to the FTP . We have attached the file.
2. We are trying to run the command as "javac test.java" in web console and it is prompting the error as 

[user_397722@ip-20-0-41-202 ~]$ javac test.java
javac: file not found: test.java
Usage: javac 
use -help for a list of possible options
Jan 10 in Java by digger
• 27,640 points
41 views

1 answer to this question.

0 votes

You have to enter the commands as below,

Example Java Command: 

▪ Compile: javac -cp .:/opt/cloudera/parcels/CDH/lib/hbase/lib/*:/opt/cloudera/parcels/CDH/lib/hadoop/lib/*:/opt/cl oudera/parcels/CDH/lib/hadoop/client/* YourFileName.java 

▪ Execute: java -cp .:/opt/cloudera/parcels/CDH/lib/hbase/lib/*:/opt/cloudera/parcels/CDH/lib/hadoop/lib/*:/opt/cl oudera/parcels/CDH/lib/hadoop/client/* YourFileName

answered Jan 10 by Omkar
• 67,460 points

Related Questions In Java

0 votes
1 answer

How to run a JAR file in Java?

The command given below will help you ...READ MORE

answered Jun 1, 2018 in Java by parth295
• 4,620 points
634 views
0 votes
1 answer

Which is the standard concise way to copy a file in Java?

As toolkit mentions above, Apache Commons IO ...READ MORE

answered Nov 15, 2018 in Java by Frankie
• 9,810 points
21 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,190 points
321 views
0 votes
3 answers

How to read a Text File in Java?

You can use readAllLines and the join method to ...READ MORE

answered Jul 27, 2018 in Java by samarth295
• 2,190 points
88 views
0 votes
0 answers

Directory not found while using java -classpath

I'm using command java -classpath  ${HADOOP_CLASSPATH} -d '/home/shravanth/Desktop/wordcount/classes' ...READ MORE

4 days ago in Big Data Hadoop by shravanth
18 views
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,380 points

edited Nov 6, 2018 by Omkar 8,107 views
0 votes
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,090 points
1,974 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,090 points
5,150 views
0 votes
2 answers

What is the meaning of purpose of this command: java -jar <some jar file>.jar ?

JAR (Java Archive) file is a package file ...READ MORE

answered Mar 21 in Java by Omkar
• 67,460 points
41 views
0 votes
1 answer

Unable to execute jar- file: “no main manifest attribute”

The proper syntax to run a jar ...READ MORE

answered Apr 22 in Java by Omkar
• 67,460 points
213 views