hi
i tried to upload the file bt i cant
i want to upload file which size is greater than 200 Mb and also it should be csv file.
please guide me
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.
hi
i tried to upload the file bt i cant
i want to upload file which size is greater than 200 Mb and also it should be csv file.
please guide me
Why? Did you get exceptions? If so what are they? If not, we have no clue about your project and as a result can't provide much help withouti tried to upload the file bt i cant
it gives me exception like outofmemory:Java heap space
How are you uploading? Post code...without knowing the workings of the process....well, its called guessing.
If you're loading the whole file into the program you have to increase the heap past the default size. Try running your program in Terminal as so; java -Xmx500M nameOfClass.java
If it's a jar: java -Xmx500M -jar nameOfJar.jar
I agree...but presuming its a servlet (in the servlets section) that is throwing the exception,its a bit more complex than increasing the memory (again, the original poster needs to provide more information for us to know for sure). If your saving the file somewhere, try doing so through a stream rather than reading it into memory the saving the contents.If you're loading the whole file into the program you have to increase the heap past the default size.