Mahender Rao

Greenhorn
+ Follow
since Oct 28, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mahender Rao

Yeah....Thanks Dittmer...

I got the solution, the problem is with the

changeWorkingDirectory("DataFeed/");

If i give that it looks for the file in DataFeed/DataFeed/ directory. Since i am giving absolute paths in rename method, there is no need of changeWorkingDirectory.

Am i right Dittmer???

once again thanks....


Thanks Ulf Dittmer,




After execution of above method the file was not moved from DataFeed folder to NewDataFeed Folder, it still exists in DataFeed folder and the rename method returning false.

So, my doubt is that the parameters whatever i am passing for rename method, are they right?
Helo Friends,

I want to move the file from DataFeed/testData.zip to other Directory NewDataFeed/testData.zip with in the FTPServer, for that i am using ftpClient.rename method, but i am not able to move the file, my code is as follows



Ranchers, Please help me.....
When i compiled this in java 1.6 environment it is giving errors ate line-1 and line-2 and when i did in java 1.5 it is giving error at line-1.



I have a doubt, When i replace "a="+a with some string, It is giving compilation error at line-2.
the compilation error is,

Sample.java:3: illegal start of expression
private int a=1; //line 1
^
Sample.java:4: <identifier> expected
System.out.println("SomeText"); //line 2
^
Sample.java:4: illegal start of type
System.out.println("SomeText"); //line 2
^

Why it is giving Compilation error at line-2? and it is saying <identifier> expected, what identifier it is expecting? Please, Can anyone explain?

Thanks in Advance.
When compiling with JDK1.6 the answer will be 2nd option and with JDK1.5 the answer will be 3rd option.
correct me if i am wrong...
I compiled the program in java 1.6 and getting compilation error at System.out.println statement.
The console is showing as follows

D:\practice>javac TestLocvar.java
TestLocvar.java:5: illegal start of expression
public int x=12;
^
TestLocvar.java:10: <identifier> expected
System.out.println(x+r+e+p);//---------line 2
^
TestLocvar.java:10: <identifier> expected
System.out.println(x+r+e+p);//---------line 2
^
TestLocvar.java:12: class, interface, or enum expected
}→
^
4 errors

When i compiled in java 1.5 i am getting like this

D:\practice>javac TestLocvar.java
TestLocvar.java:5: illegal start of expression
public int x=12;
^
TestLocvar.java:6: illegal start of expression
protected int r=5;
^
TestLocvar.java:7: illegal start of expression
private String r1="gani";
^
3 errors

Why so? why it is not showing error at System.out.println statement in Java 1.5? Can anyone explain?
Thanks in Advance...