LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2005, 03:35 PM   #1
amer_58
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2
Posts: 213

Rep: Reputation: 30
Help with compiling java files....


I did install:

netbeans-4.1
jdk1.5.0_05
jre1.5.0_05

I am able to compile files:
javac filename.java

and the filename.class file is created, but i still cant run the file after compiling it, if i do this:

java filename.class

this is what i get:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: filename/class
I did also edit my /etc/profile file:
Code:
# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/home/admin/jdk1.5.0_05/bin"
any help would be appreciated.... thanks.
 
Old 10-25-2005, 04:17 PM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
When running the program do not add the .class extension. eg:
Code:
java filename
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling java chestud_it Programming 1 10-06-2004 01:30 PM
Compiling java files from root crash75uk Linux - Newbie 2 06-27-2004 03:21 PM
Compiling Java embalmedlenin Programming 3 08-28-2003 06:57 PM
compiling JAVA JIV Programming 8 03-28-2003 11:05 PM
Help compiling java gonus Linux - Software 4 08-05-2002 12:37 AM


All times are GMT -5. The time now is 07:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration