Skip to main content

java me and ftp

No replies
Joined: 2010-06-27

The following java has been tested on java and works fine, it will upload ther text file to the ftp server.

How can I convert this java code to j2me since j2me doesnt have class...

<p>package javaapplication1;</p>
<p>import it.sauronsoftware.ftp4j.FTPClient;</p>
<p>/**<br />
*<br />
* @author bruno<br />
*/<br />
public class Main {</p>
<p>    /**<br />
     * @param args the command line arguments<br />
     */<br />
    public static void main(String[] args) {<br />
        // TODO code application logic here</p>
<p>        try<br />
        {<br />
        FTPClient client = new FTPClient();<br />
        client.connect("serveraddy");<br />
        client.login("user", "pass");<br />
        client.upload(new"C://text.txt"));<br />
        }<br />
        catch(Exception e)<br />
<p>        e.printStackTrace();<br />
<p>    }</p>

This is the line which I am struggleing with...

How does j2me approach this since ther eis no class?

Thanks in advance