Please, read carefully this FAQ. Any e-mail for which the answer is clearly in the FAQ will be silently ignored
Java issues
- Q: my program works at home but not on a cse machine, is it acceptable ?
- A: no.
- Q: I compile my program with
javac myclass.java
and I get the following error:
myclass.java:9: package org.apache.xerces.parsers does not exist
import org.apache.xerces.parsers.DOMParser;
^
myclass.java:91: cannot find symbol
symbol : class DOMParser
location: class XMLContainer
DOMParser theParser = new DOMParser();
- A: You must compile with
javac -cp /usr/share/java/xercesImpl.jar myclass.java
. - Q: I run my program with
java myclass ...
and I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: myclass at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: ass1. Program will exit.
- A: You must run your program with
java -cp .:/usr/share/java/xercesImpl.jar myclass ...
. - Q: My program runs fine under eclipse but not on the command line
- A: By default, eclipse adds the current project directory to the class path (
-cp
option). Use the command line above to compile and run your program - Q: When running my program I see this error:
- A: By default the JVM does not have access to the whole memory space of the machine. Your program is using more memory
than originally reserved by the JVM. You can run your program with:
java -Xmx1024m -cp .:/usr/share/java/xercesImpl.jar myclass ...
to allow the JVM to use 1GB of memory (and you can increase as much as the physical amount of ram on the machine). If the error persists, you something in your program is taking too much space. If you need to use more than 1024MB of memory for the assignments we give you, there is most likely a bug in your program. - Q: When running my program I see this error:
Exception in thread "main" java.lang.StackOverflowError
...
- A: This means your program uses more stack space than originally reserved by the JVM. This happens if you have a very recursion.
(e.g. you explore a very deep tree with a recursive function). You can run your program with:
java -Xss1m -cp .:/usr/share/java/xercesImpl.jar myclass ...
. This reserved 1MB for the recursive call stack and should be enough for most programs. If the error persists for higher values (2m, 16m, ...) you most likely have an infinite recursion.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
...
Assignment marking
- Q: I have handed my assignment early, can I have my mark already?
- A: No, you have to wait that all assignments are handed
- Q: The deadline has just passed, can I have my mark already?
- A: No. We accept late submissions (with a penalty of 10% of the points per day late) for up to five days. We only start marking after this delay has passed, you can usually get your marks one week after the deadline.
- Q: Can I still submit my assignment 5 days after the deadline ?
- A: Yes. We do not apply any additional penalty after 5 days and leave it at -50% of the total mark. However if no assignment has been submitted two weeks after the deadline, you will get 0 points. In any case, if you plan to submit your assignment more than 5 days past the deadline, notify us in advance, using the class's email address. If you know that you will have trouble to meet a deadline due to exceptional circumstances, you can ask for a special consideration, and we will not apply the late penalty.
- Q: What is an exceptional circumstance ?
- A: Refer to UNSW and CSE's policy on special considerations. In particular, High workload in other courses is NOT an exceptional circumstance.
- Q: What are these Bonus points ?
- A: Bonus points are not mandatory. It is a way for us to reward students who spend more time on a particular assignment. It also helps to compensate if you have a bad mark in another assignment.
- Q: How can I check the marks for an assignment ?
- A: On a cse machine:
4317 classrun -collect ass1
. This will give you the detail of the points and the test that you failed - Q: I did my assignment correctly without the bonus part and I only get 10/12
- A: The marking system does not allow us to give more points than the total for an assignment. Therefore a student with full mark for the assignment and the bonus would get 12/10, which is refused by the markin system. So we choose to display 10/12, but this doesn't mean you failed anything mandatory. There are 4 assignments on 10 points (some of them with bonus parts) and one on 20 points, which gives a total of 60 points for the programming assignments.