Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
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 03-19-2008, 04:04 PM
Member
 
Join Date: Mar 2008
Posts: 1
fred33 is on a distinguished road
[noob]Problem with TOS .bat
Hello,
I'm working with eclipse and i've a problem to launch an Talend .bat
I want to start a Talend job behind a jbutton.
This is my code :
Code:
try { String[] cmd = new String[3]; cmd[0]= "cmd.exe"; cmd[1]= "/C"; cmd[2]= "C:\\workspace\\Test\\TestPgmJava_run.bat"; Runtime rt = Runtime.getRuntime(); final Process proc2 = rt.exec(cmd); new Thread() { public void run() { try { BufferedReader reader = new BufferedReader(new InputStreamReader(proc2.getInputStream())); @SuppressWarnings("unused") String line = ""; try { while((line = reader.readLine()) != null) { // Traitement du flux de sortie de l'application si besoin est System.out.println("erreurint: "+line+"\n"); } } finally { reader.close(); } } catch(IOException ioe) { ioe.printStackTrace(); } } }.start(); // Consommation de la sortie d'erreur de l'application externe dans un Thread separe new Thread() { public void run() { try { BufferedReader reader = new BufferedReader(new InputStreamReader(proc2.getErrorStream())); @SuppressWarnings("unused") String line = ""; try { while((line = reader.readLine()) != null) { // Traitement du flux d'erreur de l'application si besoin est System.out.println("erreur1 : "+line+"\n"); } } finally { reader.close(); } } catch(IOException ioe) { ioe.printStackTrace(); } } }.start(); proc2.waitFor(); int status = proc2.exitValue(); System.out.println("valeur de retour du sous proc2: "+status); } catch (Exception e3) { // TODO: handle exception e3.printStackTrace(); } } }); } return jButton; }
When i start the program i have this error message
erreurint:

erreurint: C:\workspace\Test>java -Xms256M -Xmx1024M -cp ../lib/jt400.jar;../lib/jxl.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;testpgmjava.jar;../lib; projet_corep.testpgmjava.TestPgmJava --context=Default

erreur1 : java.lang.NoClassDefFoundError: jxl/write/WritableWorkbook

erreur1 : Caused by: java.lang.ClassNotFoundException: jxl.write.WritableWorkbook

erreur1 : at java.net.URLClassLoader$1.run(Unknown Source)

erreur1 : at java.security.AccessController.doPrivileged(Native Method)

erreur1 : at java.net.URLClassLoader.findClass(Unknown Source)

erreur1 : at java.lang.ClassLoader.loadClass(Unknown Source)

erreur1 : at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

All the .jar are in c:\workspace\test\lib

What i'm doing wrong ?
Thanks
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
Ah! Help a Java Noob Snejana New To Java 4 01-24-2008 05:52 AM
Noob nokomis Introductions 1 11-09-2007 11:42 PM


All times are GMT +3. The time now is 11:22 PM.


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