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,620 points
33 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,120 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,600 points
326 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
18 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
199 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
60 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 6,140 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,050 points
1,617 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,050 points
4,308 views
0 votes
1 answer

Selenium JARS(Java) missing from downloadable link

Nothing to worry about here. In the ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,050 points
333 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,120 points
32 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,120 points
134 views