Natural Evolution of Programming Languages & other things.

0 views
Skip to first unread message

Abdelrahman

unread,
Jan 2, 2007, 12:23:20 PM1/2/07
to jav...@googlegroups.com
Ba3d El salam we el ta7ya 3ala shabab CS wee EENG,

It has been a while now, I hope you all are enjoying the 3eed and the vacation.

This is slightly off topic, but is interesting. It seems that there is a new programing language is evolving from (C,C++,C#) and Java.

Check this: http://www.digitalmars.com/d/

Youssef, Do you still have problems on running your Java programs outside NetBeans ? I got it working on linux. If you want, i can send instructions for both Linux and Windows (There aren't much differences).

Do anyone have any new information about the University\Microsoft courses (C#, ASP.NET ... ) that suppose to start on the 9th ? Where, Is there an entrance exam for the courses?

Regards,
Abdelrahman

y...@hotmail.com

unread,
Jan 2, 2007, 12:55:13 PM1/2/07
to javaron
I still can't run them throgh the command prompt.
I change the driectory to the one that has the .java file and then
I type the command "java filename.java" but it gives me this error:
Exception in thread "main" java.lang.NoClassDefFoundError: Main

I also tried the command "java -classpath . Filename" (without .java).
same error.

I don't like the command prompt in windows. The linux is more
comfortable to use.
It lets you want to use it. Stupid Raid thing that is letting me not
boot linux...

y...@hotmail.com

unread,
Jan 2, 2007, 1:16:46 PM1/2/07
to javaron
Just notices the file you added. Will have a look at that. Thanks.

Also glanced through the D language site. The code has bits of
everything. especially C and Java.
It looks promising. But it still needs to grow, libraries and classes
still have to be built for it.
Wonder if it's going to show itself useful for guis like Java.

I kinda like it.

Abdelrahman

unread,
Jan 2, 2007, 6:01:27 PM1/2/07
to jav...@googlegroups.com
Hello Again,

The ".java" file is a text file that contains the high level code we make i.e equivalent to .cpp file in C++. You have to compile this file to produce the java bytecode for the Java Virtual Machine to be able to run it. Use wikipedia for more info!

To compile the ".java" file from command line:

javac main.java

this should produce an compiled file main.class

Now you can run the program

java main    //(without .class)

"Exception in thread "main" java.lang.NoClassDefFoundError: Main (wrong name: SOMETHING)"

use the command

On windows: set CLASSPATH=

On Linux: unset CLASSPATH

then try again java main (without .class)


Try that and tell me what do you think!

Abdelrahman

Abdelrahman

unread,
Jan 2, 2007, 6:20:13 PM1/2/07
to jav...@googlegroups.com
About the Raid thing, try using another distro other than Ubuntu. perhaps opensuse?!

http://en.opensuse.org/How_to_install_SUSE_Linux_on_software_RAID

Abdelrahman

On 1/2/07, y...@hotmail.com <y...@hotmail.com> wrote:

y...@hotmail.com

unread,
Jan 3, 2007, 5:54:34 AM1/3/07
to javaron
There's that suse again...

y...@hotmail.com

unread,
Jan 3, 2007, 6:32:42 AM1/3/07
to javaron
It turned out I have this partial installation of the JDK.
No wonder it didn't recognize javac as a command.
I'm installing the new JDK ver 6 now. Maybe that will fix it.
Oh, maybe you've seen this on the Java Passion pages. They tell you
about this plugin you can install to make the windows command prompt
work similar to the linux terminal. Not a bad idea right. I might just
go for that.
I was entering the commands correctly before. At one point I got this
linking error (I guess it was a linking error). It was this long list
of java classes that weren't happy with the code, although it ran with
NetBeans without difficulties.

y...@hotmail.com

unread,
Jan 3, 2007, 1:28:46 PM1/3/07
to javaron
I think I found out what might be wrong, or maybe not. Either way I
don't know what to do.
I've installed the new JDK but did not get different results. Plus, I
can't use javac to compile. Because the command prompt doesn't
recognize javac as a program that can be executed.

I've gone through the instructions explained at the beginning of the
lab section in the Java Passion pages and the first thing that wouldn't
work was the "echo %JAVA_HOME% all it does is display everything after
the echo, and I'm guessing this is not what it's supposed to be doing.
I think echo is to echo a message but I think that when you put the
message between two % signs, then this does something else.
Ah well. Kind of a shame that this is not working. but at least
NetBeans is.
By the way, I talked to Ahmed Shash the other day, and he thinks JGrasp
is better than NetBeans (in recognizing files, he says, I think). He
also thinks JCreator isn't so bad but he likes JGrasp a bit more.

Abdelrahman

unread,
Jan 3, 2007, 2:40:28 PM1/3/07
to jav...@googlegroups.com
On linux, I have the javac executable in /usr/bin which why I can run it from any directory. On windows it is the same. For a command to run from any directory it has to be in windows\system32 or perhaps you have to add JAVA_HOME to the enviroment varibles in System Properties>advanced.

Or just browse to the directory of Java SDK and run javac from there?

y...@hotmail.com

unread,
Jan 7, 2007, 1:16:13 PM1/7/07
to javaron
It's working!!! Well not entirely but some if it. It's sort of working.
I tried lots of stuff, so I'm not entierely sure of what it was that
made it work.
But when it isn't working I still no the reason for it, so I guess
that's good too.
The thing that is making not work ALL is a classpath issue. I guess you
could say that it's like
not being able to find the String class for example. It's not all
packed in a nice enironemtn like it's done in Netbeans or Visual
Studio. You have to watch out for it yourself.

Reply all
Reply to author
Forward
0 new messages