Require help setting URL as Java String Variable
public static void main(String args[]) throws Exception
{
String url = "https://elasticbeanstalk-us-east-1-190553128079.s3.amazonaws.com//Employee//Employee.xlsx";
try
{
FileInputStream fis = new FileInputStream(url);
System.out.println("fis"+fis);
}catch(Exception e)
{
e.printStackTrace();
}
}
I am getting following Error
java.io.FileNotFoundException: https:\elasticbeanstalk-us-east-1-190553128079.s3.amazonaws.com\Employee\Employee.xlsx (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at com.webproject.HelloWorld.main(HelloWorld.java:20)
Please help
File need to read as https:\elasticbeanstalk-us-east-1-190553128079.s3.amazonaws.com\Employee\Employee.xlsx
{
String url = "https://elasticbeanstalk-us-east-1-190553128079.s3.amazonaws.com//Employee//Employee.xlsx";
try
{
FileInputStream fis = new FileInputStream(url);
System.out.println("fis"+fis);
}catch(Exception e)
{
e.printStackTrace();
}
}
I am getting following Error
java.io.FileNotFoundException: https:\elasticbeanstalk-us-east-1-190553128079.s3.amazonaws.com\Employee\Employee.xlsx (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at com.webproject.HelloWorld.main(HelloWorld.java:20)
Please help
File need to read as https:\elasticbeanstalk-us-east-1-190553128079.s3.amazonaws.com\Employee\Employee.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad I could help
ASKER