Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-21-2008, 11:10 PM
Member
 
Join Date: Jun 2008
Posts: 1
annie is on a distinguished road
file not found outside of Netbeans
Hi All,
I have created a java project within Netbeans that uses a perl script as an external resource. The perl script executes as expected when the project is run within Netbeans. However, when I run the generated jar file outside of netbeans it does not find the perl script.

Here is the part of the code that Im using to execute the perlscript:

URL perlURL = getClass().getResource("resources/test.pl");
File f=new File(perlURL.toString());
try {
Process proc=Runtime.getRuntime().exec("perl "+perlURL.getPath());
BufferedReader input=new BufferedReader(new InputStreamReader(proc.getInputStream()));
...

Process error:
Can't open perl script "file:/home/tota/NetBeansProjects/DesktopApplication1/dist/DesktopApplication1.jar!/desktopapplication1/resources/test.pl": No such file or directory

I have also tried using perlURL.getFile() and perlURL.getPath().

The project includes 2 folders, the “myProject “ folder which contains the *.class files and a “resources” folder containing the perl files. The resource file is a subfolder in the myProject folder.

I would appreciate any kind of help with this!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
javac file not found teamkeff New To Java 6 06-23-2008 11:17 PM
GeoPoint Not found nvidia NetBeans 2 05-28-2008 10:31 PM
could not be found in the registry alam99 Eclipse 0 01-08-2008 09:21 AM
404 Not Found mary Java Servlet 5 11-07-2007 11:15 AM
ConnectException not found tamayo New To Java 1 07-23-2007 09:23 AM


All times are GMT +3. The time now is 06:15 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org