Author | Message |
---|---|
raylongma1018
Posts: 81
|
Posted 01:27 Aug 05, 2015 |
when i try to implement some functions for File class I found it has the same name for java.io.File. So when i try to call the new File() class the eclipse can only choose the File() class either from java.io or the csjobs.model. The only way I know how to resolve this issue is by changing the File() class name in csjobs.model. Is there any other way to resolve this issue? |
raylongma1018
Posts: 81
|
Posted 01:47 Aug 05, 2015 |
well i tried to put csjobs.model.File file rather than File file and resolve this issue, but I don['t know if this is the proper way to do it. |
cysun
Posts: 2935
|
Posted 08:30 Aug 05, 2015 |
Yes, using the full qualified name of the class (i.e. package name + class name) is the proper way. |
nextmatrixman
Posts: 57
|
Posted 16:49 Aug 06, 2015 |
In the self-defined "File" class there's the property "type", what is this referring to? I've checked the java.io.File class and there's a method "getContentType()" which returns a string, is this what it is? |
cysun
Posts: 2935
|
Posted 19:36 Aug 06, 2015 |
I use it to store the content type of the uploaded file, which you can get by calling the getContentType() method in MultipartFile. |