New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Terminal broken?


Post Reply New Thread Subscribe

 
Thread Tools
Elan

 
Member Since: Feb 02, 2008
Posts: 22
Elan is on a distinguished road
Mac Specs: Powermac G4, 1GHZ, 1.5GB Ram, 320GB, 320GB, 250GB HDs, Mac OS 10.4.11

Elan is offline
Hello.

I am currently reading sams teach yourself java 2 in 24 hours and I got an error when trying to run a compiled script using the terminal.

Emac:~ admin$ javac /J24Work/BigDept.java
Emac:~ admin$ java /J24Work/BigDept
Exception in thread "main" java.lang.NoClassDefFoundError: /J24Work/BigDept
Emac:~ admin$

Anyway. I tried what it said to do on this page:
http://www.ics.uci.edu/~thornton/ics...ingUpJava.html

Which didnt seem to work, and now, every time i open a new terminal window, I get

Last login: Sun Feb 3 13:38:38 on ttyp1
Welcome to Darwin!

Without the prompt, and none of the commands work.

If I close the window, i get a message saying:

Closing this window will terminate the following processes inside it: login, bash, cat

So I hit terminate.

Terminate doesnt seem to work however, as it still does the same thing whenever I open a new terminal window.

Any ideas why, and how to fix it?
Also if you could tell me why I got that error when interpreting the compiled script then that would be great aswell.

Thanks.
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
If you are comfortable working in the shell environment. Then try booting into single user mode. Once in single user mode, move to you user accounts home folder/directory. Take a look at your dot files (.profile, .cshrc, .login, etc) to be sure they are not corrupted.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
You may want also look at system preferences -> accounts ->login items tab. For your account and more sure there is nothing that has been added.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
Aptmunich

 
Aptmunich's Avatar
 
Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
Aptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant future
Mac Specs: Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2

Aptmunich is offline
Does "Emac:~ admin$ javac /J24Work/BigDept.java" complete correctly?

Meaning, do you see a "BigDept.class" file in that directory?

Is the .java file really located at the top of your harddrive in the "J24Work" directory? Or is in in your user's folder?

The error basically means java can't find something that it needs to run the app.

Which version of OS X are you running?
Normally OS X comes with everything you need to run apps the way you did from the command line...
QUOTE Thanks
Elan

 
Member Since: Feb 02, 2008
Posts: 22
Elan is on a distinguished road
Mac Specs: Powermac G4, 1GHZ, 1.5GB Ram, 320GB, 320GB, 250GB HDs, Mac OS 10.4.11

Elan is offline
Quote:
Originally Posted by Aptmunich View Post
Does "Emac:~ admin$ javac /J24Work/BigDept.java" complete correctly?

Meaning, do you see a "BigDept.class" file in that directory?

Is the .java file really located at the top of your harddrive in the "J24Work" directory? Or is in in your user's folder?

The error basically means java can't find something that it needs to run the app.

Which version of OS X are you running?
Normally OS X comes with everything you need to run apps the way you did from the command line...
Yes the BigDept.class file is been created in that directory.

I am currently running os x 10.3.9.

Upgrading to tiger soon.

Thanks
QUOTE Thanks
Aptmunich

 
Aptmunich's Avatar
 
Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
Aptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant future
Mac Specs: Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2

Aptmunich is offline
Have you tried installing this?
http://www.apple.com/support/downloa...acosx1039.html
QUOTE Thanks
Elan

 
Member Since: Feb 02, 2008
Posts: 22
Elan is on a distinguished road
Mac Specs: Powermac G4, 1GHZ, 1.5GB Ram, 320GB, 320GB, 250GB HDs, Mac OS 10.4.11

Elan is offline
Thanks but im not that fussed about it anymore since i found the SDK Eclipse which seems to be pretty good for developing java applications/applets.

I figure that once I get tiger this problem with the terminal will fix itself. But ill keep your link bookmarked.

Cheers.
QUOTE Thanks
Aptmunich

 
Aptmunich's Avatar
 
Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
Aptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant future
Mac Specs: Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2

Aptmunich is offline
Yeah, I use eclipse almost exclusively now as well...
It's a bit much for starting out, but if you're serious about getting into Java that's what the pros use
QUOTE Thanks
higher43

 
Member Since: Feb 10, 2008
Posts: 3
higher43 is on a distinguished road

higher43 is offline
I am also having trouble with terminal. The problems aren't the same but they are confusing. I type this in terminal : bzfs.txt I have this file on my mac but after it says :-bash: bzfs.txt: command not found What does "command not found" mean? Please help
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
higher43 it appears that your issue is different than Elan's . It appears that you are trying to execute (run) a text file (bzfs.txt). That is why you received a command not found. bzfs.txt is not a command or it does not have excute permissions.

Also higher43 it would be better to start your on thread, than to hijack someone else, when your problem is not the same.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
jdgti

 
jdgti's Avatar
 
Member Since: Mar 14, 2005
Location: Atlanta, GA
Posts: 444
jdgti will become famous soon enough
Mac Specs: 17" Macbook Pro Unibody 2.66 Ghz and Powerbook G4 1.67 GHz 2.0GB RAM

jdgti is offline
Higher43:

I believe you need to use an editing program to open the file. Some examples are emacs, which the OP is using. I personally use VI though the learning curve on it is much steeper. Emacs is pretty much like most text editors, you just open type and that's what you get. Others use "pico" which is pretty easy too. However, as with most programs with steep learning curves, once you fight through it you feel very comfortable and feel unproductive using anything else. So choose wisely.

Google

Emacs
VIM
Pico

See which one you like best. Hope that helps.
QUOTE Thanks
Elan

 
Member Since: Feb 02, 2008
Posts: 22
Elan is on a distinguished road
Mac Specs: Powermac G4, 1GHZ, 1.5GB Ram, 320GB, 320GB, 250GB HDs, Mac OS 10.4.11

Elan is offline
Quote:
Originally Posted by rman View Post
If you are comfortable working in the shell environment. Then try booting into single user mode. Once in single user mode, move to you user accounts home folder/directory. Take a look at your dot files (.profile, .cshrc, .login, etc) to be sure they are not corrupted.
Hmm I tried reinstalling my software and it didnt seem to fix the problem.

Actually I do not know that much about the shell enviroment.

After booting into single user mode, what commands should I do to check if thoughs files are not courrupt?

Thanks.
QUOTE Thanks
Elan

 
Member Since: Feb 02, 2008
Posts: 22
Elan is on a distinguished road
Mac Specs: Powermac G4, 1GHZ, 1.5GB Ram, 320GB, 320GB, 250GB HDs, Mac OS 10.4.11

Elan is offline
The terminal seems to be working fine when i use it from another account, does that help?

Also if I hit control D multiple times, I seem to be getting results from commands I have executed in the past.

Last login: Thu Mar 13 13:35:17 on ttyp1
Welcome to Darwin!
Exception in thread "main" java.lang.NoClassDefFoundError: /J24Work/BigDept
java version "1.4.2_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05-303)
Java HotSpot(TM) Client VM (build 1.4.2-86, mixed mode)
-bash: emac:: command not found
-bash: djava: command not found
java version "1.4.2_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05-303)
Java HotSpot(TM) Client VM (build 1.4.2-86, mixed mode)
[Process completed]

Yeah I need to fix this problem since installing tiger didnt do it.

Any help appreciated.

Thanks.
QUOTE Thanks
Elan

 
Member Since: Feb 02, 2008
Posts: 22
Elan is on a distinguished road
Mac Specs: Powermac G4, 1GHZ, 1.5GB Ram, 320GB, 320GB, 250GB HDs, Mac OS 10.4.11

Elan is offline
The terminal functions fine if I hit control C when I open it, but it would be nice to not have to hit control C every time I want to use it.
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
Quote:
Originally Posted by Elan View Post
The terminal seems to be working fine when i use it from another account, does that help?

Also if I hit control D multiple times, I seem to be getting results from commands I have executed in the past.

Last login: Thu Mar 13 13:35:17 on ttyp1
Welcome to Darwin!
Exception in thread "main" java.lang.NoClassDefFoundError: /J24Work/BigDept
java version "1.4.2_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05-303)
Java HotSpot(TM) Client VM (build 1.4.2-86, mixed mode)
-bash: emac:: command not found
-bash: djava: command not found
java version "1.4.2_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05-303)
Java HotSpot(TM) Client VM (build 1.4.2-86, mixed mode)
[Process completed]

Yeah I need to fix this problem since installing tiger didnt do it.

Any help appreciated.

Thanks.
Am I understanding you correctly. If you use another account you don't have a problem with the terminal application?

looking at the above. It appears that on start of the terminal application you are trying to execute emacs and djava.

Check and see if you have one of the following:

.profile
.bash_profile
.bash_login

In one of these files you may have something that maybe causing your problem.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks

Post Reply New Thread Subscribe


« i need to run a couple of terminal commands at starup | C compiler for OSX »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Terminal problems please help CliveO OS X - Operating System 6 03-20-2007 10:04 AM
terminal sessions abc OS X - Apps and Games 1 03-10-2007 05:40 PM
Terminal Problem WROC OS X - Apps and Games 5 01-09-2007 04:01 PM
Terminal Help rs2sensen OS X - Apps and Games 1 04-25-2005 10:52 PM
Terminal nbizm 3 for the price of 1 Bo Eddy OS X - Development and Darwin 5 05-04-2004 12:40 PM

All times are GMT -4. The time now is 08:11 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?