Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Cache Download problem

  1. #1
    Member
    Join Date
    Jan 2011
    Posts
    88
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Cache Download problem

    hey. im trying to make my clients cache download automatically. heres my error

    Gui.java:42: not a statement
                    CacheDownloader.downloadCache;
                                   ^
    1 error
    Finished!
    Press any key to continue . . .

    heres my gui

    	public static void main(String[] args)
    	{
    		new Gui();
    		CacheDownloader.downloadCache;
    	}

    heres "downloadCache" in CacheDownloader

    	public static void downloadCache(client client) {
    		try {
    			File location = new File(getCacheDir() + "/" + cacheName + "/");
    			File version = new File(getCacheDir() + "/cache" + cacheName
    					+ getCacheVersion() + ".dat");
     
    			if (!location.exists()) {
    				downloadFile(getCacheLink(), getArchivedName(), false, client);
    				unZip();
    				BufferedWriter versionFile = new BufferedWriter(new FileWriter(
    						getCacheDir() + "/cache" + cacheName
    								+ getCacheVersion() + ".dat"));
    				versionFile.close();
    			} else {
    				if (!version.exists()) {
    					downloadFile(getCacheLink(), getArchivedName(), false,
    							client);
     
    					unZip();
     
    					BufferedWriter versionFile = new BufferedWriter(
    							new FileWriter(getCacheDir() + "/cache" + cacheName
    									+ getCacheVersion() + ".dat"));
    					versionFile.close();
    				} else {
    				}
    			}
    		} catch (Exception e) {
     
    		}
    	}


  2. #2
    Junior Member
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Cache Download problem

    obviously you try run downloadCache without attributes. Probably you already fix that

Similar Threads

  1. How to Download a file via FTP
    By JavaPF in forum Java Networking Tutorials
    Replies: 1
    Last Post: December 24th, 2011, 10:56 AM
  2. Connecting to Cache through JDBC - error
    By javavick in forum JDBC & Databases
    Replies: 0
    Last Post: May 6th, 2010, 06:34 AM
  3. Facing problem with posting Excel file for download - Content in browser
    By ragz_82 in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: February 9th, 2010, 07:28 AM
  4. Help needed in excel download...
    By tester in forum Java Servlet
    Replies: 2
    Last Post: February 9th, 2010, 07:14 AM
  5. KB/s download speed calculating
    By Kok in forum Java Theory & Questions
    Replies: 2
    Last Post: December 16th, 2009, 02:05 PM

Tags for this Thread