• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Java

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
dalibred
Just Arrived
Just Arrived


Joined: 19 Nov 2003
Posts: 0


Offline

PostPosted: Sat Dec 13, 2003 3:47 pm    Post subject: Java Reply with quote

hi, i wonder if i can get help with this problem

i cannot run the "java" command fromn the command line, the "javac"command runs ok and produces the class file but the java command gives an error " exception in thread "main" noclassdeffounderror: " and i think this is making me unable to run jlex and cup files from my windows machine, i normally use linux, but having to make do with windows for the time being.
the other thing is programs compile and execute ok using "JCreator" but for the need of running jlex and cup files i need the command line to work.
Back to top
View user's profile Send private message AIM Address MSN Messenger
flw
Forum Fanatic
Forum Fanatic


Joined: 27 May 2002
Posts: 16777215
Location: U.S.A.

Offline

PostPosted: Sun Dec 14, 2003 2:02 am    Post subject: Reply with quote

Have your already look thrugh these? http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=noclassdeffounderror&btnG=Google+Search
Back to top
View user's profile Send private message Visit poster's website
Dforce101
Just Arrived
Just Arrived


Joined: 14 May 2004
Posts: 0
Location: NY

Offline

PostPosted: Mon May 24, 2004 3:38 pm    Post subject: Reply with quote

Maybe a stupid question since i don't know your programing skill level... but the java program you are trying to run... sounds like u don't have the main argument in the code so u can run the app?

public static void main(String[] args)
Back to top
View user's profile Send private message
el-half
Just Arrived
Just Arrived


Joined: 01 Jan 2004
Posts: 0
Location: Cyberspace

Offline

PostPosted: Tue May 25, 2004 12:45 pm    Post subject: Reply with quote

You have to mess with the CLASSPATH variable.
If it still doesn't work you can still run your Java apps by cd'ing to the correct directory and using this: java -cp . AFile.class
Back to top
View user's profile Send private message Visit poster's website
grith
Just Arrived
Just Arrived


Joined: 28 May 2004
Posts: 0


Offline

PostPosted: Sat May 29, 2004 11:15 pm    Post subject: Reply with quote

try typing java -classpath .;.;
this should work
Back to top
View user's profile Send private message
siva210383
Just Arrived
Just Arrived


Joined: 06 Jul 2004
Posts: 0
Location: India

Offline

PostPosted: Wed Jul 07, 2004 9:56 pm    Post subject: Reply with quote

hey its very simple the error occurs only if u hav different names for ur java file and the class containing the main function.... r u sure u hav used a same name for both ur java file and ur class containing the main function???
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jennefer
Just Arrived
Just Arrived


Joined: 12 Dec 2005
Posts: 0


Offline

PostPosted: Mon Dec 12, 2005 1:15 pm    Post subject: JLex and CUP Reply with quote

hey, I,m also having the same problem... i also want to use JLex and CUP for our thesis... the problem is that I cannot install these softwares... please help me... i'm wondering, whether I can use JLex with JCreator... please teach me... please email me at axessyy@yahoo.com VERY,VERY SOON... THANKS...
Back to top
View user's profile Send private message
vjy
Just Arrived
Just Arrived


Joined: 05 May 2004
Posts: 0


Offline

PostPosted: Mon Dec 12, 2005 2:28 pm    Post subject: Reply with quote

Hey guys,
you need to have a variable called CLASSPATH in your environment variables and you need to have the value of the CLASSPATH as . which means current directory.

e.g. CLASSPATH = .;

Add this and re-run the program and it will work fine.
Hope this helps.
Thanks
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register