Third party classes

          I am using some third party Java classes that i added to the c:\bea\wlserver6.0\lib directory to use in some deployed servlets. the servlets cannot find these classes. where do they need to reside? thx ...derek
          

          Correct, if you put the jars in WEB-INF/lib, it's like putting them in
          the classpath of the web app, you don't have to do any other
          configuration.
          This is documented in the Servlet 2.2 spec, which documents .war files
          (available at http://java.sun.com/products/servlet/index.html). Chapter
          9 "Web Applications," Section 9.4 "Directory Structure."
          It's also briefly mentioned in the WebLogic 6.0 docs about configuring
          web apps, at:
          http://edocs.bea.com/wls/docs60/adminguide/config_web_app.html#100368
               -- Jim
          dc wrote:
          >
          > Is that bit of wisdom documented somewhere (other than right here)? I
          > couldn't find it.
          > Do I then not have to specify each individual jar file? I just put them
          > there and WL will open them up and looky-see?
          >
          > Apparently.
          >
          > "Gary Keim" <[email protected]> wrote in message
          > news:[email protected]...
          > > Or, if your 3rd-party classes are archived, <app-root>/WEB-INF/lib.
          > > --
          > > Gary
          > >
          > > "Mark Spotswood" <[email protected]> wrote in message
          > > news:[email protected]...
          > > > The classpath for servlets is <app-root>/WEB-INF/classes, where
          > > > <app-root> is your .war file or exploded web app hierarchy.
          > > > --
          > > > mark
          > > >
          > > > derek wayland wrote:
          > > >
          > > > > I am using some third party Java classes that i added to the
          > > c:\bea\wlserver6.0\lib directory to use in some deployed servlets. the
          > > servlets cannot find these classes. where do they need to reside? thx
          > > ...derek
          > > >
          > >
          > >
          

Similar Messages

  • Memory leaks with Third party classes

    Hello all,
    This is fairly known problem. But I guess, my problem gives a new dimention to the problem.
    I have an application which is developed by me. This application ideally needed to use third party classes ( obviously no source code is supplied ). These third party classes provide extra functionality required.
    The problem is, when I don't use third party classes in my application, every thing is fine. When I include third party classes, I am having memory leaks.
    Then I tried to investigate memory leaks with Optimizeit tool. It is new to me. As of now, I understood, we can identify where the memory leaks are occuring.
    finally the problem is, in order to solve this, I need some patches in the code. But I don't have source code for those classes. How to solve this problem?
    For example,
    I use a third party classes in my code like this,
    ThirdPartyMemoryLeakClass obj = new ThirdPartyMemoryLeakClass();
    This 'obj' is made static, as it takes lot of time to create this object. Obviously this object contains several references to other objects, which I can't control.
    In the process of reusing this object, I am getting memory leaks.
    Any ideas regarding, how one has to deal this type of situations? What are the issues involved with this case? Are there any similar problems, which have been solved? are most welcome.
    many thanks for your time.
    Madhav

    Decompile it using jad. Find leak.Yes, I too got the idea and tried to decompile those classes and recompile. I had some problems while recompiling. Is this is the only way to get rid of this problem?
    I was refering to powersoft.datawindow.DataStore class. Does any body here has worked on these?
    Can you suggest me how to find the memory leak causes? if you were needed to find out memory leak causes, what would be your approach?
    Madhav

  • Deploying Common-utilities and Third-party Classes

    In your documentation you state that several jar-libraries (containing
    utilities, third-party classes, jdbc-drivers and also I suppose classes for
    custom realms) needs to added to the Java system classpath.
    This probably also means that they will not be distributed from the
    administration server to the managed servers as applications does. Since
    most non-trivial applications include startups, custom realms and so forth
    it renders the distribution feature (ie. from admin server to managed
    server) virtually useless. Installs needs to be made on all nodes anyway.
    One example on a solution for this is to distribute these jar-libraries to
    the new node-manager which then starts up the server with these jar-files on
    the classpath?
    Also one could include the startup and shutdown-classes in a
    weblogic-specific enterprise application deployment-descriptor so that these
    are run in the same classloader as the enterprise application. Most
    non-trivial startups probably needs to run in this classloader anyway. (If
    they for example access ejbs etc.)
    An alternative implementation would be to specify a servlet with a
    load-on-startup, but I'm not sure at what time the servlet will be loaded.
    Is this a recommended strategy for startup-classes that needs to run in the
    application classloader?

     

  • Marshalling third party classes with JAXB

    I put together a test case similar to what is illustrated at:
    [https://jaxb.dev.java.net/guide/XML_layout_and_in_memory_data_layout.html#Using_XmlJavaTypeAdapter_for_element_attribute_values]
    and here:
    [http://weblogs.java.net/blog/kohsuke/archive/2005/09/using_jaxb_20s.html]
    I declared a Color object, defined a ColorAdapter, and declared the @XmlJavaTypeAdapter to the package. Alas, it isn't getting called... If you consider the following sample code:
    JAXBContext jc = JAXBContext.newInstance(Color.class);
    // Note that a dump of the context confirms that com.acme.Color is listed!
    //System.out.println("JAXBContext: " + jc.toString());
    Marshaller m = jc.createMarshaller();
    m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
    Color color = Color.RED;
    // Case 1: The following line works, but it does NOT call the ColorAdapter...
    m.marshal( new JAXBElement( new QName("", "rootTag"), Color.class, color ), System.out);
    // Case 2: This fails...
    m.marshal(color, System.out);Case 1 "works" (doesn't error), but the output clearly shows that the ColorAdapter is not getting called.
    Case 2 throws a javax.xml.bind.MarshalException exception:
    javax.xml.bind.MarshalException
    - with linked exception:
    [com.sun.istack.SAXException2: unable to marshal type "com.acme.Color" as an element because it is missing an @XmlRootElement annotation]
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:
    328)
    testMarshalling : javax.xml.bind.MarshalException
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav
    a:254)
    at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshal
    lerImpl.java:75)
    at resty.AppTest.testMarshalling(AppTest.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    - with linked exception:
    [com.sun.istack.SAXException2: unable to marshal type "com.acme.Color" as an element because it is missing an @XmlRootElement annotation]
    at java.lang.reflect.Method.invoke(Method.java:597)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
    Caused by: com.sun.istack.SAXException2: unable to marshal type "com.acme.Color"
    as an element because it is missing an @XmlRootElement annotation
    at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:244)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:303)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:490)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:325)
    ... 29 moreNote that my Color object represents a third-party class -- a class where I can't just annotate it with @XmlRootElement. Hence, why I am looking at @XmlJavaTypeAdapter.
    Can somebody please tell me why my adapter is not getting called, and what I can do about customizing the marshaling of a third-party class?
    Note that I am using JAXB 2.1.8.

    what kind of third party API are using ?

  • Adding Third-Party Classes

    Hello, I have a bunch of third party classes that I wish to use as javac complies...
    Where do I place these files and what format do they have to be in (i.e. a folder or a jar file)?
    Thank you!

    They can be in either directories or jar files. You just need to make sure that they are included in your $CLASSPATH.

  • How do i access a third party .class file

    Hi,
    I am new to both java and enterprise 8, and would greatly appreciate some help.
    I have a third party .class file and want to include it in a project so i can call it's methods etc. I can access it by creating an object as follows
    thirdPartyClass tpc= new thirdPartyClass();and then create a .class file of my own using javac at the command line without any probles, but if I use the same code in enterprise 8 it reports an error stating "cannot access MyProjectName.thirdPartyClass" could someone please tell me how to reference this file as so far I have not been able to find anything.
    Thanks for any help.

    Thanks for the suggestions it appears I was doing more or less the right things but miss reading the error message:
    Cannot access keyword.classes.thirdPartyClass
    bad class file C:\java\keyword\classes\thirdPartyClass
    class file contains wrong class: thirdPartyClass
    please remove or make sure it appears in the correct subdirectroy of the classpath.
    While looking I have found that the classes do not contian src folders of Javadoc so I will go see if the third party can supply a Jar file or similar.
    Thanks

  • SerialVersionUID problem with third party class

    Hello,
    One of our projects is using java 6 (that won't change). We need to use some third party APIs which is developped using java 5, and I guess some wild rmi implementation.
    If I try to use this api from a java 5 project, no problem.
    If I try to use it from java 6, I got this exception.
    Is there something I could try (workaround, something I can tell the api provider to fix, ...)?
    "C:\Program Files\Java\jdk1.6.0_01\bin\javaw.exe" -client -classpath D:\dev\TestAde\Project1\classes;D:\dev\TestAde\Project1\lib\ADEAde.jar;D:\dev\TestAde\Project1\lib\ADEConfig.jar;D:\dev\TestAde\Project1\lib\ADEJDom.jar;D:\dev\TestAde\Project1\lib\ADEMisc.jar;D:\dev\TestAde\Project1\lib\ADEStubs.jar project1.Test
    Exception in thread "main" java.lang.RuntimeException: Unable to connect to the server : java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.io.InvalidClassException: sun.rmi.server.UnicastRef; local class incompatible: stream classdesc serialVersionUID = -9213327104222131866, local class serialVersionUID = 8258372400816541186
    at com.adesoft.config.ServerLocation.getRemoteConfig(Unknown Source)
    at com.adesoft.config.ConfigManager.getRemote(Unknown Source)
    at com.adesoft.config.ConfigManager.getProperty(Unknown Source)
    at com.adesoft.login.WebSessions.<init>(Unknown Source)
    at com.adesoft.login.WebSessions.getInstance(Unknown Source)
    at com.adesoft.beans.SessionBean.setLogin(Unknown Source)
    at project1.Test.main(Test.java:14)
    Process exited with exit code 1.

    The serialVersionUID of sun.rmi.server.UnicastRef in 1.5 is -9213327104222131866L. Strangely it isn't defined in the source code, just left to be calculated at runtime.
    I recommend you first search all your JAR files on both client and server, apart from the Java rt.jar of course, for classes in java.rmi.* and sun.rmi.*. If you find any class in these packages, or indeed in sun.* or java.*, complain loudly to the supplier, and try deleting them.
    If you don't find any such thing, I would then report this as a bug to Sun and I would also post it to the RMI-USERS mailing list where you will probably get a very rapid response.

  • Cannot find embedded third-party .class in my own signed .cab

    Hello,
    This is complicated.
    I'm building an applet that operates a piece of hardware on a PC (think Win32-only.) A third-party provider (henceforth referred to as TPP) provides software drivers that will be installed on client machines.
    ORIGINALLY the TPP provided a <client>.dll and a C/C++ SDK. To make the project work, I followed the article http://www.javaworld.com/javaworld/jw-10-1998/jw-10-apptowin32.html.
    I built <homegrown>.DLL using JNI, made a signed <homegrown>.cab, and the applet works just great on IE. However, I have to ditch the entire thing (see below.)
    Now the TPP is providing a Java SDK in a <client>.JAR. The SDK interfaces with a <client_jni>.dll.
    I can expect that the client machine will have <client>.dll and <client_jni>.dll installed in the \winnt\system32 (or whichever %SYSTEMROOT% directory.)
    So, I ditched the <homegrown>.dll, and built a new .cab. Now, to build the .cab, I took the contents of <client>.jar and dumped them into the same directory structure as the one I use to build <homegrown>.cab. Note that <client>.jar is not signed.
    So in other words, if you look at the exception below, I, in fact, do have a directory structure that contains: "com/IridianTech/PIDresult.class" and "com/panasonic/authenticam/LoginApplet.class"
    When I run the applet, it asks me if I want to run the signed applet. I click Yes. The Java Console responds with the following:
    Error loading class: com.IridianTech.PIDresult
    java.lang.NoClassDefFoundError
    java.lang.ClassNotFoundException: com.IridianTech.PIDresult
         at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
         at java/lang/ClassLoader.loadClassInternal (ClassLoader.java)
         at com/panasonic/authenticam/PIDInterface.<init> (PIDInterface.java:12)
         at com/panasonic/authenticam/LoginApplet.init (LoginApplet.java:52)
         at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
         at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
         at com/ms/applet/AppletPanel.run (AppletPanel.java)
         at java/lang/Thread.run (Thread.java)
    I have looked at the contents of <homegrown>.cab with WinZip, and I can see PIDresult.class in the right place.
    HOW I AM TESTING: I have IBM Websphere running directly on my PC.
    TWO QUESTIONS:
    1. Do I need to sign the applet anymore, just to use a pre-installed client_jni.dll? (Probably)
    2. WHAT DO I DO??

    This is some code i'm using:
    <applet code="upload.class" archive="upload.jar" codebase="." width="500" height="200">
    <!--<param name="codebase" value="."> -->
    <param name="cabbase" value="upload.cab">
    <param name="button_text" value="Upload via HTTP">
    <param name="file_varname" value="filename_value"><!-- where is this for? -->
    <param name="upload_url" value="http://10.2.1.133/upload/recieve.php">
    </applet>

  • Setting path for third party class files

    I am using some third party classfiles in my JSPs for JDBC. When I use these files, in normal Java Programs everything is working fine ( I am setting the path by using the CLASSPATH environment variable).
    I did not understandt how to set classpath for these files (com.informix.jdbc.*) for use in iplanet 6.0.
    I have tried to keep this "com" folder in /usr/java/j2sdk1.4.3_01/lib folder, but, it is not still working. I tried to change the start-jvm file, but, I am still having problems.
    Can someone help me !!!
    --Murthy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I changed the jvm12.conf file, but, it did not work. I changed the JDK Runtime Classpath in the Global Settings tab of the Administration Server and restarted both the webserver and the administration server and it worked.
    Thanks for your response.
    --Murthy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to load a third party class

    Hai all
    I have a ApplicationLifecycleListener class, in ths class am using a hibernate
    releated stuffs, which needs some classes to be preloaded. how can i preload these
    classes or how can i specify this to the weblogic server. and i have placed all
    the hinernate replated jar in the ear root.
    with reg Senthil kumar M R

    Classes/jars in the ear root are not in the application's classpath.
    If you're using 8.1, then move the jars to <ear root>/APP-INF/lib/ and
    classes to <ear root>/APP-INF/classes
    If you're using < 8.1, you'll have to use manifest class-path entries.
    -- Rob
    Senthil Kumar M Rangaswamy wrote:
    Hai all
    I have a ApplicationLifecycleListener class, in ths class am using a hibernate
    releated stuffs, which needs some classes to be preloaded. how can i preload these
    classes or how can i specify this to the weblogic server. and i have placed all
    the hinernate replated jar in the ear root.
    with reg Senthil kumar M R

  • Trouble importing third party classes & using linked list in j2me

    Hi!
    I need to use the linked list data structure in a j2me application im developing. Al long as I know, it is not included in standard libraries.
    I found the "workaround", the substitution in Jade Laepaddon. This is actually a set of classes in a directory.
    I know this is extremely dumb, but I have no luck impotring these classes in my project.
    Im using the WTK2.0 to compile and execute the application, but I don't have an Idea how to add a directory in the CLASSPATH.
    So, the actual question should be: how to include a directory of files, so that it can be imported with:
    import dirName.*;
    Thanks!

    Tha import problem is solved, but I'm still not able to use the LinkedList class. In the jade/util/leap there is a LinkedList.java file, but I get an error :
    /home/mile/WTK2.0/apps/myGame/tmplib/jade.jar(jade/util/leap/LinkedList.java):48: class LinkedList is public, should be declared in a file named LinkedList.java
    (source unavailable)
    /home/mile/WTK2.0/apps/myGame/tmplib/jade.jar(jade/util/leap/LinkedList.java):48: cannot resolve symbol
    symbol : class List
    location: class jade.util.leap.LinkedList
    (source unavailable)
    /home/mile/WTK2.0/apps/myGame/tmplib/jade.jar(jade/util/leap/LinkedList.java):48: cannot resolve symbol
    symbol : class Serializable
    location: class jade.util.leap.LinkedList
    (source unavailable)
    /home/mile/WTK2.0/apps/myGame/tmplib/jade.jar(jade/util/leap/Iterator.java):41: class Iterator is public, should be declared in a file named Iterator.java
    (source unavailable)
    when initialising an LinkedList type object.

  • NoClassdefFoundError on the third-party jar's classes when building APK

    I am building a native extension for Android.
    For the android library, I create a android project and add several third-party jar files to build path.
    I extract a jar file from a android project and merge it and third-party jar files into a single jar file.
    I package ANE using a merged jar file and build a APK.
    When I install a APK and launch it, NoClassdefFoundError on the third-party class occurs.
    I use Flash Builder 4.6 and set sdk version to the Flex SDK 4.6.0 + AIR SDK 15.0.0.356.
    I decompile APK and check the classes.dex.
    Strangely a certain jar's classes are missing in the classes.dex.
    I tried googling and found a similar case.
    The following is the link :
    http://stackoverflow.com/questions/24777394/noclassdeffounderror-on-thirdparty-class-files -when-building-adobe-native-extens
    I try to follow the answer in this link.
    Did dx.jar in the AIR SDK really strip out some classes of third-party jar file??
    I inquired the java version of the third-party related with NoClassdefFoundError.
    Now I am waiting for the reply.
    Is anybody else know about this?

    The android-support-v4.jar is same.
    I check android-support-v4.jar's classes in ANE.
    But they are missing in APK after release build.
    I don't know why.
    I use Flash Builder 4.6 and Flex SDK 4.6.0 + AIR SDK 15.0.0.356.
    Is there anyone else know about this???

  • Using JAXB for classes extending third party objects

    I am trying to use JMX WS connector in my project. I have stuck with a problem I cannot solve. For example, I have class
    public class TypedObjectName extends ObjectName
    I do not know how to annotate this class. If I am trying to use @XmlRootElement annotation and provide no-arg default constructor for this class, JAXB throws an error
    Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    javax.management.ObjectName does not have a no-arg default constructor.
    this problem is related to the following location:
    at javax.management.ObjectName
    at com.hp.usage.mgmt.naming.TypedObjectName
    I am not able to modify ObjectName because it is a part of jdk, third party class from javax.management. I need to have this class in JAXB context since one my service has a method with this type, for example
    *public interface PerformanceMeasurement {*
    public TypedObjectName getJob();
    Any ideas to make it workable?

    Yes, right, I have seen this blog and if you read it carefully, there is a note rearding root object
    The root object case is not quite as clean. The result of the unmarshal operation will be the adapted object, then you will need to call the conversion code yourself.
    It means I need to change an API, in case of JMX WS Connector, instead of
    public interface PerformanceMeasurement {
    public TypedObjectName getJob();
    I will provide
    public interface PerformanceMeasurement {
    public TypedObjectNameAdapter getJob();
    Not sure that it is a good idea
    Edited by: tvv2000 on 03.02.2013 21:24

  • Problems with the ActiveX bridge for Java beans when using third-party .jar

    I encountered the following problem when using the ActiveX bridge for a java bean:
    I am using JDK 1.4.2_09 and MS Visual Basic 6.0 (SP6). I wrote a java bean called ProcessViewer (my class ProcessViewer inherits from JComponent and implements the interfaces Serializable and AdjustmentListener) which I would like to use within a VB 6.0 application. I used the ActiveX bridge (packager.exe) to generate a DLL (ProcessViewer.dll) and registered it successfully. The java bean GUI-control works fine within my VB 6.0 application unless my java bean (ProcessViewer.jar) uses any third-party .jar files.
    But when I tried to add a reference to some third-party class (com.sap.xxx.xxx....) I got some problems. I could solve the problem with packager.exe by setting the correct CLASSPATH. But at runtime my VB 6.0 application does not work. It crashes or it reports an error like this: "The control ... could not be loaded from axbridge.dll" (although I deployed my .jar file correctly to the directory C:\Programme\Java\j2re1.4.2_09\axbridge\bin and lib). Setting the CLASSPATH environment variable before calling my VB 6.0 application (exe) did not solve the problem.
    How can I teach my VB 6.0 application (containing the Java bean ActiveX control) where to find the third-party .jar file? Copying the third-party .jar file to the JRE lib-folder or to the axbridge\lib folder did not solve the problem either.
    I studied the documentation about the ActiveX bridge given at:
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    but I am missing informations on how the third-party .jar files can be found during runtime of the ActiveX container (e. g. a VB 6.0 application).

    See how to solve your problem with JNI:
    http://codeproject.com/cpp/OOJNIUse.asp
    More examples (for SWING) in tools setup:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
    http://www.simtel.net/product.php[id]93174[SiteID]simtel.net

  • Redirecting stdout of third party API?

    Good Morning (or afternoon),
    I have an interesting problem with an application that I am writing.
    I am using my own classes, as well as a third party package that somebody developed, in this application.
    I have developed a GUI for ease of use and in this GUI I have a textarea component that shows all stdout messages.
    To achieve this I simply used System.setOut(PrintStream out) to redirect the output to my textarea. Now, all stdout messages display on my textarea. So far so good.
    The problem came when I used the third party package. The third party stdout still goes to the default (terminal).
    I have to use the third party package through it's main method so I am calling ThirdPartyPackage.main(thingToPass).
    Does anyone know why this occurs, or how I can get the third party classes to use the stdout that is currently in use by the calling class?
    I am very stuck and would really appreciate any help even theoretical.
    Thankyou in advance.

    I am doing exactly the same thing, here's the code that calls an external process and appends the output to a JTextArea:
    (txtOutput is the JTextArea I'm showing the output in)
              try
                   Process proc = Runtime.getRuntime().exec(progName);
                   InputStream procStdout = proc.getInputStream();
                   InputStream procStderr = proc.getErrorStream();
                   int exit = 0;
                   boolean processEnded = false;
                   while(!processEnded)
                        try
                             exit = proc.exitValue();
                             processEnded = true;
                        catch(IllegalThreadStateException e) {} // still running
                        int n = procStdout.available();
                        if(n > 0)
                             byte[] pbytes = new byte[n];
                             procStdout.read(pbytes);
                             //System.out.print(new String(pbytes));
                             //System.out.flush();
                             txtOutput.append(new String(pbytes));
                             txtOutput.setCaretPosition(txtOutput.getText().length());
                        n = procStderr.available();
                        if(n > 0)
                             byte[] pbytes = new byte[n];
                             procStderr.read(pbytes);
                             System.err.print(new String(pbytes));
                             System.err.flush();
                        try
                        Thread.sleep(10);
                        catch(InterruptedException e) {}
                   System.out.println();
                   System.out.println("Process exited with: " + exit);
              catch (java.io.IOException e)
                   System.out.println(e.toString());
              }

Maybe you are looking for

  • ITunes 12.1 not syncing TV Shows with 1st Gen Apple TV

    I recently purchased season 2 of House of Cards via iTunes on my Mac. My 1st generation Apple TV and my 12.1 Version of iTunes syncs my music, pictures, movies, but not the TV shows. The setting are set to "Sync All Unwatched Shows". I reset my Apple

  • Can't get HP DesignJet 500 connected

    We are trying to get a Mac with Snow Leopard OS connected to our DesignJet 500. The DJ500 is connected via a Linksys printer server to our Window Server 2003. I've tried a bunch of work arounds, but it either won't connect, has on hold authentication

  • Safari Bookmarks Disappearing

    My Safari Bookmarks keep disappearing every few days. I know how to recover them from Time Machine but it is really annoying having to do it repeatedly. It has only happened since I moved from Mobile Me to iCloud. Any ideas why this is happening?

  • Selecting first N characters when querying the CMS

    I am trying to retrieve only the first 6 characters of the SI_KEYWORDS field when querying the CMS from within the SDK.  When testing within QueryBuilder the following in bold does not work, although LEFT is a command for achieving this in SQL.  Can

  • Can we do repair full after re-intiliazing datasources?

    Hi Experts, I work in Production support environment. We are currently involved in bringing back the missed delta records. Currently, we have put our Process chain on hold. We are undertaking Repair Full request activity. Daily, we have been doing ma