Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 DWITE Turing Discoveries.
Index -> CompSci.ca, Contests -> DWITE
Goto page Previous  1, 2, 3, 4  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mr.S.




PostPosted: Tue Nov 07, 2006 6:05 am   Post subject: (No subject)

The input data files for the first submission are usually different than the input data files for the second submission. It is possible that your code got hung up on the first submission but not on the second submission. The input and output files are posted under Previous Contest Results link at www.dwite.org. Check out your code against these files.

Mr.S.

cool dude wrote:
another wierd thing about dwite is that at times we submit our program and it says it took too long to run when it clearly runs less than a second. so we submit it it the second time and we get full points for it.
Sponsor
Sponsor
Sponsor
sponsor
Mr.S.




PostPosted: Tue Nov 07, 2006 6:21 am   Post subject: (No subject)

The DWITE judge currently uses Excelsior Jet Personal Edition Java Compiler - jc.exe which can handle Java 2 - 1.4. It was free from their site a couple of years ago. Their current compiler which is compatible with Java 2 - 1.5 costs $100 for an educational license. I have contacted Excelsior, and asked them to send me a free copy. I am waiting for a reply.

If someone knows of another way for me to handle Java with the DWITE judge, please let me know.

Thanks. Mr.S.


McKenzie wrote:
I was bugging Will to upgrade to Java 1.5. He told me it was top priority. Instead he posted on his site that they are using 1.4. Oh well, at least it's not as bad as the University of Windsor competition where they assured us they could handle 1.5, only to discover at the last minute that they could only use 1.4.
Tony




PostPosted: Tue Nov 07, 2006 9:28 am   Post subject: (No subject)

I would say Sun's javac, but that just seems way too trivial. I must be missing something.

code:

javac Source.java
java Source.class
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
wtd




PostPosted: Tue Nov 07, 2006 12:08 pm   Post subject: (No subject)

It's free Tony, and therefore must be inferior.
Tony




PostPosted: Tue Nov 07, 2006 2:04 pm   Post subject: (No subject)

I get your sarcasm, but
Mr. S wrote:

Excelsior Jet Personal Edition Java Compiler ... was free from their site a couple of years ago.

Actually it would be for the best to move away from the paid compilers for the reasons discussed here. It would not be fair to participating students if the judge is running a paid propriatory compiler that they can't get a hold of to get accustomed to, or at least test before the submission.

That's why next year DWITE will be running javac Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mr.S.




PostPosted: Tue Nov 07, 2006 9:52 pm   Post subject: (No subject)

Excuse my ignorance with Java.

Prog1_1.java contains the following code:
code:

import java.io.*; // Java I/O
import java.text.DecimalFormat; // Formatting

public class Prog1_1
{
        public static void main(String args[]) throws IOException
        {
                BufferedReader input = new BufferedReader( new FileReader("DATA11.txt") );
                PrintWriter output = new PrintWriter ( new FileWriter("OUT11.txt"));
                DecimalFormat twoDigits = new DecimalFormat("0.00");
                for(int i=1; i<=5; i++)
                {
                        double number = Double.parseDouble(input.readLine());
                        output.println(twoDigits.format(number*number));
                }
                output.close();
                System.exit(0);
        }
}


I execute: javac prog1_1.java and it creates prog1_1.class
I execute: java prog1_1.class and get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: prog1_1/class

Help?

Mr.S.

Tony wrote:
I would say Sun's javac, but that just seems way too trivial. I must be missing something.

code:

javac Source.java
java Source.class
zylum




PostPosted: Tue Nov 07, 2006 10:56 pm   Post subject: (No subject)

javac prog1_1.java
java prog1_1.class

it's case-sensitive so should be Prog1_1.java/class

also i dont think your class should be public.
Andy




PostPosted: Wed Nov 08, 2006 1:21 am   Post subject: (No subject)

it does have to be public
Sponsor
Sponsor
Sponsor
sponsor
Mr.S.




PostPosted: Wed Nov 08, 2006 5:52 am   Post subject: (No subject)

Same error.

I'm certain that I have the case-sensitive problem resovled. If the class is not public, how should it be coded.

Again, excuse my ignorance about Java. This is probably quite trivial, but I have done no programming in Java.

Thanks. Mr.S.

zylum wrote:
javac prog1_1.java
java prog1_1.class

it's case-sensitive so should be Prog1_1.java/class

also i dont think your class should be public.
Tony




PostPosted: Wed Nov 08, 2006 9:34 am   Post subject: (No subject)

apparently it's because
Quote:

java.lang.NoClassDefFoundError: sun/tools/javac/Main means that your classpath is not set correctly. Make sure your JAVA_HOME is set up right

Which would be pretty redicilous, since I'm getting the same exception on Solaris ! Then again other trivial java programs through the same thing.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Andy




PostPosted: Wed Nov 08, 2006 3:12 pm   Post subject: (No subject)

oh! that's not what you call.

javac prog1_1.java
java prog1_1
Tony




PostPosted: Wed Nov 08, 2006 3:48 pm   Post subject: (No subject)

oh wow, Andy's right. Totally my bad (that's what you get for not doing Java in so long).

could someone enlighten me as to what the deal with .class is then? I would guess that it is added implicitly by java, but then why is there that exception if prog.class.class is called? Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Andy




PostPosted: Wed Nov 08, 2006 4:37 pm   Post subject: (No subject)

try to do a java on some other random file, it should give you the same error. in the prog1_1.class.class there is no main class =P
Tony




PostPosted: Wed Nov 08, 2006 4:48 pm   Post subject: (No subject)

Andy wrote:
try to do a java on some other random file, it should give you the same error.

It does
Tony wrote:

on Solaris ! Then again other trivial java programs through the same thing.


Andy wrote:
in the prog1_1.class.class there is no main class =P

but there is no prog1_1.class.class Confused shouldn't it be throwing 'no file found' exception instead?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
[Gandalf]




PostPosted: Wed Nov 08, 2006 4:57 pm   Post subject: (No subject)

Tony wrote:
but there is no prog1_1.class.class Confused shouldn't it be throwing 'no file found' exception instead?

Guess they don't know about file not found exceptions? Razz
Display posts from previous:   
   Index -> CompSci.ca, Contests -> DWITE
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 3 of 4  [ 46 Posts ]
Goto page Previous  1, 2, 3, 4  Next
Jump to:   


Style:  
Search: