The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Invoke java program in script mpang_ Shell Programming and Scripting 0 03-27-2006 11:05 PM
Invoke java program in different processc d liux99 UNIX for Advanced & Expert Users 1 08-18-2005 01:47 AM
executing the su command from a java program. shailendrat UNIX for Dummies Questions & Answers 1 03-24-2005 12:27 PM
Java program calling a UNIX command QUartz Ite UNIX for Dummies Questions & Answers 2 11-15-2001 09:17 AM
Communication between a java and c++ program lmnt22 High Level Programming 4 11-13-2001 04:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-12-2006
umen umen is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 239
how can i run java program from any where

Hello all sorry didnt know where to post it
i compiled simple program that using "System.getProperty("user.dir");"
now i compiled the program under directory foo and and its running great when i do "java myapp"
i included this directory in the $PATH env variable so i could see it fro any where in the system
but now when i try to run this java app from other place in the file system with "java myapp" it gives me "Exception in thread "main" java.lang.NoClassDefFoundError:" erorr . why is that ?
Thanks
  #2 (permalink)  
Old 06-12-2006
sssow sssow is offline
Registered User
  
 

Join Date: Aug 2001
Posts: 179
You have to set the CLASSPATH

or specify the classpath at runtime like

java -cp /local/foo classfile

Last edited by sssow; 06-12-2006 at 10:43 PM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 05:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0