Source/class paths

Hi,
I'm developing a web application. i use JBuilder. I need to maintain my source files module wise . In other words I need to create a sub directory for each module in source file root folder and contain source files in those sub folders in root source folder(.java files) like.
     \com\Leave\<all the source files related to Leave module>
     \com\Medical<all the source files related to Medical module>
According to that I need to maintain class files too. so it would look like
     \classes\com\Leave<all the class files related to Leave module>
     \classes\com\Medical<all the class files related to Medical module>
So how do I create multile source paths/files and class paths/files respectively?

I havent worked on Jbuilder, but setting up souce path & output path shouldnt be difficult.
Just check your project properties.. and set the souce path to /src
"src" should hold ur com/..blah..blah..blah
ouput path to /classes
During project build the class folder and files should get generated automatically.

Similar Messages

  • JBO:33001 bc4j.xcfg file not found in class path

    Hi,
    I am yet another victim of the age-old error JBO:33001 bc4j.xcfg file not found in class path, When i have my BC4JApp.jar in Tomcat Web-inf/lib directory. All the other jar files and class files in my webserver-application web-inf classes and lib directory works.
    But Tomcat server is not able to read this bc4j.xcfg file. I can see in my jar file that this bc4j.xcfg exists and in the specified package directory. still the problem persists. My BC4JApp.jar is perfectly working when i use JDeveloper. but not when i use tomcat4.0 and call a JSP using BC4JApp.jar from browser (My environment is Jdeveloper3.2, Tomcat4.0+IIS in middle tier and oracle 8i as DB, everything on windows2k)
    I have gone through almost all the threads possible that relates to this error in this form. None of them have a answer except to say "put the file in classpath". and last reply is "will fix in jDeveloper 9i. So what happens to us who are working in Jdeveloper 3.2?
    1. I have this file in my jar file.
    2. I also tried creating a seperate directory manually, with the same name as my package under web-inf/classes, web-inf/lib , just under web-inf directory and atlast under approot directory also. I tried having my package directory containing bc4j.xcfg in these folders one at a time and also tried having this directory in all these folders at the same time.
    Still no solution.
    Itz frustrating that neither proper documentation nor a right url page nor i am aware of available addressing this. page links given in above threads only gives me the wonderful page of ie's "Page cannot be displayed".
    Is there a answer to this error and my problem. If this doesn't work, then i have to all the way develop from scratch creating my jsp using JDBC calls and Stored packages etc.
    I don't want to give up on this Jdeveloper at this final moment because if this bc4j.xcfg file is found, my application will work perfectly. on these final moments, if this doesn't work, i am frightened to imagine to develop my application in standard way. Atlast, if thatz the option left,we have to do that bcos our production date is close by.
    Please can some one in this forum or Jdeveloper help me to solve this problem. I am desperate and very urgent.
    Waiting for a reply from Jdev team very much...
    ( I just posted in the other thread which is pretty old, dated backto May 2001, which was relevant to this error. Just to make sure it is noticed, I am posting it seperately too)
    Thanks
    Hari(2/3/02)

    Hi All,
    For those who are following this thread, I got a solution for this error with the help of Jdev Team.
    This solution may work, if you have deployed your application in Tomcat4.0.1. This is the environment in which I work and tested.
    As you may be aware, Tomcat ignores value in CLASSPATH variable.
    To see any files that are existing or newly deployed, it has it own way of detecting it.
    Addition information on Tomcat working, you can follow this link,
    http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html
    Coming to point, Tomcat has got five classloaders and each classloader invoked, looks in their related directories for files in following order.
    1. /WEB-INF/classes of your web-application
    2. /WEB-INF/lib/*.jar of your web application
    3. BootStrap classes of your JVM (Tomcat's $JAVA_HOME/jre/lib/ext)
    4. System class loader classes($CATALINA_HOME/bin/bootstrap.jar,CATALINA_HOME/lib/tools.jar)
    5. $CATALINA_HOME/common/classes
    6. $CATALINA_HOME/common/lib/*.jar
    7. $CATALINA_HOME//classes
    8. $CATALINA_HOME/lib/*.jar
    So All your individual application related files should be deployed in your application's WEB-INF/classes or WEB-INF/lib directory accordingly.
    If your application files are unpacked, they should be deployed or copied under WEB-INF/classes directory
    if the files are within a jar, they should be under WEB-INF/lib directory.
    If your Jar-files contains bc4j components, then those jar files should be deployed under WEB-INF/lib directory. Also,do the next step to copy all relavant BC4J runtime libraries under lib directory.
    IMPORTANT: Please remember to copy and paste all the required BC4j runtime libraries in the Same WEB-INF/lib directory along with your application jar files. This is the real reason which can solve this JBO:33001 to disappear. It worked for me.
    To configure your directory for tag-lib uri's, use web.xml to set the taglib-uri attribute.
    Put your web.xml and DataTags.tld in the WEB-INF directory.
    Your simple web.xml may look like as follows.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <taglib>
              <taglib-uri>
                   /webapp/DataTags.tld
              </taglib-uri>
              <taglib-location>
                   /WEB-INF/DataTags.tld
              </taglib-location>
         </taglib>
    </web-app>
    You may then modify this web.xml to suit further requirements of your application.
    Remember to stop and restart the Tomcat Server (service) by using shutdown and startup scripts after updating any jar files/class files/ JSP or source files deployed in Tomcat.
    Sometimes, only this helps even though your context's reloadable attribute is set to true in Tomcat Server's server.xml file.
    Hope this above information helps you to solve this error in Tomcat environment. My Sincere thanks once again to Juan and Jdev team for their help and efforts to solve this problem.
    Thanks
    Hari

  • Package and class path

    for two yrs i am trying to get package right but no result
    i am using window 98
    i have my jdk in d:\jdk1.2\bin; and this works fine if i do not try to use package;somtimes it works well half way with package!
    suppose i want to create a package called rubberband and put classes in it
    i created a folder called rubberband in d:\ and then
    package rubberband;
    import java.awt.*;
    public class RubberbandTest extends Frame{}
    class RubberbandTestPanel {}
    class Colorchoice{}
    this is one unit
    and there are other classes
    package rubberband;
    import java.awt.*;
    abstract class Rubberband {}
    package rubberband;
    import java.awt.*;
    class RubberbandPanel extends Rubberband {}
    and so on
    i opened executive.bat and added to class path as follows:
    path:d:\rubberband\bin;before the already existing d:\jdk1.2\bin;
    then when i come to compile and run the program i have problems
    like:class so and so not found
    please help please step by step tell me what to do

    Another sample might answer your "different location" question.
    Suppose program YourProg in package yourPkg located in directory C:\javaprogs needs to access a class file ExtraClass in package extraPkg in directory C:\differentDir.
    1) Of course the source file must exist in file
    C:\javaprogs\yourPkg\YourProg.java
    and
    C:\differentDir\extraPkg\ExtraClass.class must exist.
    2) Inside the YourProg source, you must import ExtraClass:
    import extraPkg.ExtraClass;
    3) To compile YourProg, you must include location of extraPkg.ExtraClass in the classpath (or the compiler will complain about the inport line above):
    (a -- from C:\javaprogs directory): javac -classpath C:\differentDir yourPkg\YourProg.java
    (b -- from any directory): javac -classpath C:\javaprogs;C:\differentDir yourPkg\YourProg.java
    4) To run YourProg (assuming it contains a main method), you must include all locations in classpath:
    (a -- from C:\javaprogs directory): java -classpath .;C:\differentDir yourPkg.YourProg
    (b -- from any directory): java -classpath C:\javaprogs;C:\differentDir yourPkg.YourProg
    If you get a NoClassDefFoundError, that means that the java was run without the proper location included in the classpath passed to the -classpath argument. The -classpath argument should be ';'-separated and contain no spaces (so if a long directory name contains space you should enclose in double quotes, as this example:
    java -cp "C:\Program Files\somedir;C:\anotherdir" NameOfAClass

  • Unable to find XML document from class path resource

    Hi,
    I am trying to learn spring and wrote my first class today. I added all the jar files to the lib folder and created all the classes. When I try to run the client program I get
    [INFO] XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [MorningGreeting.xml]
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [MorningGreeting.xml]; nested exception is java.io.FileNotFoundException: class path resource [MorningGreeting.xml] cannot be opened because it does not exist
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:180)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
         at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
         at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
         at com.training.spring.greetCustomers.EnterTraining.main(EnterTraining.java:22)
    Exception in thread "main"
    I have my client, interface, XML file all in the same package com.training.spring.greetCustomers. I could not understand what I am doing wrong?? Can you please help me.

    congratulations on deciding to learn spring. that's a smart thing to do.
    stop assuming that you did it correctly. the xml file is not in the classpath. when you get it there correctly, spring will find it.
    you have the source files and xml in that directory, but where do the .class files end up when you run them? does the xml config end up there, too?
    remember, the xml config should be in the directory where the root of the package hierarchy begins, not down where the .class files are.
    %

  • Servlet class path

    Can anybody tell me what is the exact path to put the servlet class file in
    tomcat 4. I was reading a book called more servelet by Marty Hall and its metioned there that i can put them in install_dir/webapps/ROOT/WEB-INF/classes but when i browse to WEB-INF folder there is no folder named classes there.
    Please help.

    firsly i installed jdk 1.3 on my computer. Then i installed tomcat 4. Then i changed port 8080 in server.xml to 80. Then i set the JAVA_HOME path to point to jdk1.3 folder. Then i setup the class path to D:\Documents and Settings\Ashi\Desktop\tomcat\apache-tomcat-4.1.34\apache-tomcat-4.1.34\common\lib\servlet.jar
    Then i downloaded a source file named HelloServlet.java from author's website and compiled it. It compiled successfully. I copied the HelloServlet.class file to the classes directory that you asked me to create. Then i opened my browser and typed http://localhost/servlet/HelloServlet and getting error HTTP Status 404

  • Possible 'Class Path' Issues

    Hi Guys,
    I have problems compiling a file and I suspect it could be something related to classpaths. I am using NetBeans 6.9.1 as my IDE. When I set JDK 1.6 as my platform and complile, there are no issues, the programs compiles fine.
    My 'classpath' and 'path' are as follows:
    classpath:
    .;C:\Program Files\Java\jre1.6.0_07\lib\ext.;c:\java\classes;
    path:
    \....\....\....C:\Program Files\Java\jdk1.6.0_21\
    If I were to set the JDK as in 1.5, I seem to get the follwing error:
    ' cannot access org.red5.server.api.IScope
    bad class file: C:\Program
    Files\Red5\red5.jar(org/red5/server/api/IScope.class)
    class file has wrong version 50.0, should be 49.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import org.red5.server.api.IScope;
    1 error
    To rectify the problem I maded changes to my classpath and path, and yet the problem persists. The changes I made
    are as follows:
    classpath:
    .;C:\Program Files\Java\jre1.6.0_07\lib\ext.;C:\Program Files\Java\jre1.5.0_22\lib\ext.;c:\java\classes;
    path:
    \....\....\....C:\Program Files\Java\jdk1.6.0_21;C:\Program Files\Java\jdk1.5.0_22;C:\....\
    I hope someone can advise me on how I get rectify the problem and get the program to compile with JDK 1.5. Thanks.

    he wants to use JDK 1.5.Do read the thread before you post. He is* using JDK 1.5 when he gets the error message. He said so. This is the problem.* Not the solution. When he uses 1.6 he doesn't get the error.
    His environment is a bit messed up because he has PATH entries for both JDK versions.There is precisely zero evidence for that assertion.
    If he wants to compile and test with JDK 1.5, then removing 1.6 would make sense.No it wouldn't. He is using classes compiled for 1.6 with a 1.5 compiler. His problem is with red5.jar(org/red5/server/api/IScope.class) whose class version is 50.0. It's all written there above. If he wants to use that .jar file he has to use 1.6. Or else recompile that .jar file with 1.5, if he has the sources.

  • Jar: Manifest-Attribute "Class-Path"

    I've got a problem with the Class-Path-attribute of the JARs manifest-file. So I've written a real simple application to test where the problems occure... but even this trivial app does not work!
    The execution starts at "Starter.java":
    public class Starter{
          public static void main(String args[]){
                packageOne.Caller.callWriter();
    }The class "Caller" is in a JAR ("Caller.jar") in the same directory as Starter.java.
    Caller.java:
    package packageOne;
    public class Caller{
          public static void callWriter(){
                packageTwo.Writer.write("Write this");
    }The class "Writer" is in a JAR ("Writer.jar") in the same directory as Starter.java and Caller.jar.
    Writer.java:
    package packageTwo;
    public class Writer{
          public static void write(String message){
                System.out.println(message);
    }The file Caller.jar consists of Caller.class and the Manifest.mf. The package-structur/the path seams to be all right.
    The file Writer.jar consists of Writer.class and the Manifest.mf. The package-structur/the path seams to be all right.
    If I invoke the Starter with:
    java Starter -classpath Caller.jar;Writer.jareverything's fine.
    Now, I added the following line to the Manifest.mf of Caller.jar:
    Class-Path: Writer.jar(with one empty line between Manifest-Version: 1.0 and the new line.
    So... shouldn't it be possible now, to invoke the application with:
    java Starter -classpath Caller.jar ???
    It doesn't work. So: what have I misunderstood?
    (The error message is:
    Exception in thread "main" java.lang.NoClassDefFoundError: packageTwo/Writer
          at packageOne.Caller.callWriter(packageOne/Caller.java:5)
          at Starter.main(Starter.java:3)

    Hmmm, I tested it and here are the command I ran and their results. Try doing the same on your computer:aleph% mkdir packageOne
    aleph% mkdir packageTwoThat created the directories.aleph% cat > Starter.java
    public class Starter{
          public static void main(String args[]){
                packageOne.Caller.callWriter();
    aleph% cat > packageOne/Caller.java
    package packageOne;
    public class Caller{
          public static void callWriter(){
                packageTwo.Writer.write("Write this");
    aleph% cat > packageTwo/Writer.java
    package packageTwo;
    public class Writer{
          public static void write(String message){
                System.out.println(message);
    }That created the source files: Starter.java in the current directory, Caller.java under packageOne and Writer.java under packageTwo. Next the compiling and creating the manifest file:aleph% javac Starter.java
    aleph% cat > MF
    Class-Path: Writer.jarThat created additional info to be included in manifest file and put it in a file called MF.
    Then I package "caller.jar" with the manifest and "Writer.jar" without it:aleph% jar -cmf MF caller.jar packageOne
    aleph% jar -cf Writer.jar packageTwoDelete the package* directories so java wont get confused...aleph% rm -r package*And finally run the thing. Remember that the path separator is : in unix but ; in DOS, if that is what you are using.aleph% java -cp .:caller.jar Starter
    Write thisNo problems anywhere. What are the steps you did?

  • Windows classpath vs java.class.path error in QuickTime based applet

    Hello
    I've spent days reading and searching the internet, and I'm still stumped why some Windows installations are not able to run my QuickTime for Java based applet even though QuickTime is installed (the specific error is: java.lang.NoClassDefFoundError: quicktime/QTException). I have some additional details and a question that might spur someone to an insightful nudge.
    On a Windows system that fails:
    echo %classpath%
    .;C:\Program Files\QuickTime\QTSystem\QTJava.zipWhich is where QTJava.zip is found on the (faulty?) system, but java.class.path is just:
    java.class.path = C:\PROGRA~1\Java\jre6\classes
    Of the dumped system properties, only java.library.path makes any mention of the QTSystem folder (or any other QT or QuickTime related items).
    java.library.path = C:\Program Files\Safari;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\PROGRA~1\Java\jre6\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QuickTime\QTSystem\
    I ran across one thread (elsewhere) where the user was having problems with loading some classes from a complex JAR environment, and a solution was to write a custom class loader. After doing so, the user got the same error "java.lang.NoClassDefFoundError: quicktime/QTException" that was resolved by extending the custom class loader to include .zip files. I'm not sure if the solution is relevant, or if he simply broke something in his custom class loader that would have worked otherwise. I've not written a custom class loader and not sure where to begin, so before I ventured down that path I was hoping someone might shed some light as to if this is a dead end or potential solution. This is a signed applet (QuickTime now requires it, even if you are only playing files of the same server) and it does work on several Windows machines and all tested Macs.
    Thank you,
    Deron
    output to Java Console with level 5 tracing enabled
    basic: Joining applet thread ...
    basic: Joined applet thread ...
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@750159, refcount=2
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@750159, refcount=1
    basic: Done ...
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@3a9bba
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: completed perf rollup
    network: Cache entry not found [url: http://www.equushd.com/quicktime/QTException.class, version: null]
    network: Connecting http://www.equushd.com/quicktime/QTException.class with proxy=DIRECT
    network: Connecting socket://www.equushd.com:80 with proxy=DIRECT
    java.lang.NoClassDefFoundError: quicktime/QTException
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: quicktime.QTException
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 10 more
    basic: Exception: java.lang.NoClassDefFoundError: quicktime/QTException
    Ignored exception: java.lang.NoClassDefFoundError: quicktime/QTException

    Something is wrong with the library.
    Staring at java code will not help you figure that out.
    Maybe it isn't intended to be loaded in java but instead it loads java itself?
    If not then write a C/C++ basic app that links that dll in and see if you can at least get it to start.

  • Application level class paths AS2 vs AS3

    Hi,
    I've been messing around with my preferences trying to make some external classes available to any new FLA I make. At first I couldn't get it working, but then I realized I was using the wrong location. I was setting the path for my Actionscript class libraries under "Library path:" instead "Source path:".
    Now that I've messed around in PREFERENCES > ACTIONSCRIPT > ACTIONSCRIPT 3.0 SETTINGS, I wondered if there's a default that should be listed before my external classes the same way AS was setup?
    Normally my AS2 setttings looked like this..
    $(LocalData)/Classes
    /path/to/my/library
    I have those in there for my AS3 'source path' settings, but I was just following the old AS2 info is that wrong?
    Thanks,
    Dave

    Adobe didn't change the registry organization, Windows did.
    I write the installers for my company, too, so I am pretty familiar with this.
    On 64 bit Windows, the registry path you see when you get the keys in HKEY_LOCAL_MACHINE/SOFTWARE/ADOBE are the 64 bit values if you're calling the registy API from a 64 bit process. They are the 32 bit values if you're calling the registry API from a 32 bit process.
    So, you can either write seperate 32 and 64 bit installers, or you can become intimately familiar with the registry redirection that takes place on 64 bit windows. ( None of this is a concern on 32 bit-only installations of Windows )
    To learn about registry redirection go here:
    http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx
    This is a very important page for installer writers to read:
    http://msdn.microsoft.com/en-us/library/aa384129(v=vs.85).aspx

  • Class xyz is not in the class path

    When I used:
    <jsp:useBean id="blast" scope="session"class="hr.pbf.pnf.castorblast2.BlastOutput"/>
    (or other class) , I get an warning: "The class hr.pbf.pnf.castorblast2.BlastOutput" is not in the class path ???

    Hi,
    The possible reason could be that class is not present in project class path.
    Check the following location to make sure the project is configured with source and required libraries
    - Project > Properties > Java Build Path > Source Tab / Libraries Tab
    M7 Support

  • System.setProperty("java.class.path", cp)

    hello,
    I have written a little program that is supposed to set the CLASSPATH var in a instance of
    bash ... not set it permantly. Anyway, after running the program when i run,
    echo $CLASSPATH
    none of the changes i make with the program are there.... why is this?
    thanks,
    jd
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import layout.TableLayout;
    import com.incors.plaf.kunststoff.KunststoffLookAndFeel;
    public class JPathGui extends JFrame{
         JButton cpSubmit;
         JButton cpClear;
         JButton qaSubmit;
         JButton qaClear;
         JTextField cptf;
         JTextField qatf;
         public JPathGui(){
              super("JPATH ver .001");
              try {
                        UIManager.setLookAndFeel(new KunststoffLookAndFeel());
                 } catch (Exception ignored) {}
              addWindowListener(new WindowAdapter()
                     public void windowClosing(WindowEvent e){
                    System.exit(0);
              JPanel mainPanel = new JPanel();
              mainPanel.setPreferredSize(new java.awt.Dimension(800,230));
              double[][] size = {{10,780,10},{20,30,5,30,10,20,30,5,30}};
            TableLayout layout = new TableLayout(size);
            mainPanel.setLayout(layout);
              myGetClassPath(mainPanel);
              myQuickAdd(mainPanel);          
              getContentPane().add(mainPanel);
              pack();
            setSize(820,230);
            setVisible(true);
         public void myGetClassPath(JPanel mainPanel){
              JLabel cpl = new JLabel("ClassPath");
              JPath jp = new JPath();     
              cptf = new JTextField(jp.getClassPath());
              cptf.setFont( new Font("Monospaced", Font.PLAIN, 10) );
              cptf.setPreferredSize(new java.awt.Dimension(780,50));
              mainPanel.add(cpl, "1,0");
              mainPanel.add(cptf, "1,1");
              JPanel cpActionPanel = new JPanel();
              cpActionPanel.setPreferredSize(new java.awt.Dimension(780,50));
              double[][] size1 = {{570,100,100,30},{30}};
            TableLayout layout1 = new TableLayout(size1);
            cpActionPanel.setLayout(layout1);
              cpSubmit = new JButton("Submit");
              cpClear = new JButton("Clear");
              cpSubmit.setSize(40,20);
              cpClear.setSize(40,20);
              cpSubmit.addMouseListener(new command_listner());
              cpClear.addMouseListener(new command_listner());
              cpActionPanel.add(cpSubmit , "1,0");
              cpActionPanel.add(cpClear, "2,0");
              mainPanel.add(cpActionPanel, "1,3");
         public void updateCPTF(){
              JPath jp = new JPath();     
              cptf.setText(jp.getClassPath());
         public void myQuickAdd(JPanel mainPanel){
              JLabel qal = new JLabel("QuickAdd");
              qatf = new JTextField();
              qatf.setFont( new Font("Monospaced", Font.PLAIN, 10) );
              qatf.setPreferredSize(new java.awt.Dimension(780,50));
              mainPanel.add(qal, "1,5");
              mainPanel.add(qatf, "1,6");
              JPanel qaActionPanel = new JPanel();
              qaActionPanel.setPreferredSize(new java.awt.Dimension(780,50));
              double[][] size2 = {{570,100,100,30},{30}};
            TableLayout layout2 = new TableLayout(size2);
            qaActionPanel.setLayout(layout2);
              qaSubmit = new JButton("Submit");
              qaClear = new JButton("Clear");
              qaSubmit.setSize(40,20);
              qaClear.setSize(40,20);
              qaSubmit.addMouseListener(new command_listner());
              qaClear.addMouseListener(new command_listner());
              qaActionPanel.add(qaSubmit , "1,0");
              qaActionPanel.add(qaClear, "2,0");
              mainPanel.add(qaActionPanel, "1,8");
         public class command_listner extends MouseAdapter{
                 public void mouseClicked(java.awt.event.MouseEvent evt){
                       Object source = evt.getSource();
                   //cpSubmit
                   if(source == cpSubmit){
                        JPath jp = new JPath();
                        String newCP = cptf.getText();
                        boolean b = false;
                        String olcp = jp.setClassPath(newCP,b);
                        updateCPTF();
                   //cpClear
                   else if(source == cpClear){
                        updateCPTF();
                   //qaSubmit
                   else if(source == qaSubmit){
                        JPath jp = new JPath();
                        String newCP = qatf.getText();
                        boolean b = true;
                        String olcp = jp.setClassPath(newCP,b);
                        qatf.setText(null);
                        updateCPTF();
                   //qaClear
                   else if(source == qaClear){
                        qatf.setText(null);
         public class JPath {
              public String getClassPath(){
                   String cp = System.getProperty("java.class.path");
                   return cp;
              public String getPathSep(){
                   String ps = System.getProperty("path.separator");
                   return ps;
              public String getUserName(){
                   String un = System.getProperty("user.name");
                   return un;
              public String getUserHome(){
                   String uh = System.getProperty("user.home");
                   return uh;
              public String getOSName(){
                   String osn = System.getProperty("os.name");
                   return osn;
              public String getOSVersion(){
                   String osv = System.getProperty("os.version");
                   return osv;
              public String setClassPath(String newClassPath, boolean append){
                   String oldClassPath = null;
                   if(append){
                        String cp = getClassPath() + getPathSep() + newClassPath;
                        System.out.println("from setClassPath" + cp);
                        oldClassPath = System.setProperty("java.class.path", cp);
                   else{
                        System.out.println("else - " + newClassPath);
                        oldClassPath = System.setProperty("java.class.path", newClassPath);
                   return oldClassPath;          
         public static void main(String[] args){
              JPathGui jpg = new JPathGui();
    }     

    Two reasons:
    1) Setting the system property java.class.path does not change the value of the CLASSPATH environment variable in the first place.
    2) Even if it did, the change would not be visible in the original shell because the environment of the Java subprocess is destroyed. You can't change the environment of the parent process from any subprocess, including shell scripts. (That's why you have to "source" and not run .bashrc or .profile to customize environment settings)

  • Lost on the Class Path

    I'm having some serious trouble with class package path issues ... ugh!
    I've downloaded a fairly complex and well programmed FLA file and other source files in AS 3.0, and just started to adapt it for a custom application.  When I published the FLA and packages in FLash CS3, everything worked perfectly.  Then I just got Flash CS4 a few days ago, and so opened the same application in CS4, and also published it fine.  Yet, once I started to make some very simple customizations, such as create a new MovieClip, and then added "linkage" to the MovieClip in the library, the trouble started. Getting the new external class to associate to the new MovieClip was not working (although it was in the same location as the other package file, with the same class package designation), so of course I went to take a look at the preferences and set the general class path.  Interestingly, the class path was completely blank (I just installed CS4 that day).  Yet then, why was the application still working initially with no class path set?  All of your original classes were loading fine, and the application was working.  So, then when I went into actually set a class path (my new class is in the same folder: .../com/parkerandkent/components/classic/photogallery ), I start getting all kinds of errors ... and now, even if I revert back to having no class path at all, the application does not work at all (when it originally did with no class path at all).  Strange!  I am very confused about what is going on.
    There are 5 primary .as package files, all of which are linked to MovieClips in the Library:
    ClassicPhotoGallery.as
    Photo.as
    Thumb.as
    Thumbs.as
    CallTag.as (the new class)
    I've checked the properties linkage for each of these, and they all appear correct also.
    Currently, I have all of these class paths set:
       - "/Users/mac/_EXTRA/ArtMuse/GALLERY"
       - " "/Users/mac/_EXTRA/ArtMuse/GALLERY/com/parkerandkent/components/classic/photogallery"
    Currently, I get these these error messages, which are referring to only 3 of 5 total .as files (which are all in the same location, and all have the same class path designation - and none of these files is the new class I made, which now appears to be referenced okay).
    Photo.as Line 1:
    5001: The name of package 'com.parkerandkent.components.classic.photogallery' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. /Users/mac/_EXTRA/ArtMuse/GALLERY/com/parkerandkent/components/classic/photogallery/Photo .as
    Thumb.as Line 1:
    5001: The name of package 'com.parkerandkent.components.classic.photogallery' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. /Users/mac/_EXTRA/ArtMuse/GALLERY/com/parkerandkent/components/classic/photogallery/Thumb .as

    Again, the class path package designation is the same for all 5 .as files:
    package com.parkerandkent.components.classic.photogallery {
    yet the application is not working, and I get only those errors posted above.
    If I remove all source path designations, then I get NO error messages, and yet the application does not work (although, I swear it was working this way originally).

  • Java 5.0 does not recognize wrapped Class-Path in Manifest.MF of .jar file?

    Java: build 1.5.0_05-b05
    Ant: 1.6.2
    I use Ant <jar> task to create a standalone application in a .jar file. I have a very long "Class-Path" in the Manifest.MF file. The long Class-Path is wrapped at every 70th character by the <jar> task. I cannot run "java -jar <the jar file>", because Java runtime cannot find classes.
    I found the following Q&A from ANT's FAQ page,
    Q: Whenever I use the Ant jar or manifest related tasks, long lines in my manifest are wrapped at 70 characters and the resulting jar does not work in my application server. Why does Ant do this?
    A: Ant implements the Java Jar file specification. Please refer to the notes section where it discusses the maximum allowable length of a line and the concept of continuation characters.
    If a jar file produced by Ant does not work in your appserver, and that failure is due to the wrapped manifest, then you need to consult your appserver provider, as it is a bug in their appserver. Far more likely, however, is a problem in your specification of your classpath. It is not Ant's wrapping of your classpath that is the problem.
    Do not raise a bug about this issue until you have checked to ensure that the problem is not due to your classpath specification.
    Any idea?

    "will be searched ALSO."...
    From: http://java.sun.com/docs/books/tutorial/ext/basics/load.html
    Understanding Extension Class Loading
    The extension framework makes use of the new class-loading mechanism in the JavaTM 1.2 platform. When the runtime environment needs to load a new class for an application, it looks for the class in the following locations, in order:
    1. Bootstrap classes: the runtime classes in rt.jar and internationalization classes in i18n.jar.
    2. Installed extensions: classes in JAR files in the lib/ext directory of the JRE.
    3. The class path: classes, including classes in JAR files, on paths specified by the system property java.class.path. If a JAR file on the class path has a manifest with the Class-Path attribute, JAR files specified by the Class-Path attribute will be searched also.
    [snip]

  • How to run a jar file which needs another jar to be in the class path

    Hi,
    I need to execute a jar, which needs another jar to be in the classpath.
    If I run like
    java -classpath <jar1 name> -jar <main jar>
    It is giving classnotfoundexception, where as the class is available in the <jar1 name>.
    so, currently I am doing like this
    In the manifest file i have given like
    Main-Class: <class name>
    Class-Path: <jar name> <jar name2>
    then it is running fine. But, if I want to change the jar location again I need to changed the manifest file.
    Is there any way to do this? Pls help me.

    How about
    java -cp jar1.jar;jar2.jar com.acme.MainClass
    You won't need to worry about the manifest file after that and you can make a bat files (or .sh file in *nix) for it.                                                                                                                                                                                                                                                                                                                                                                       

  • ORABPEL-01005 class path is set correctly while deploying a BPEL composite.

    07:20:08 AM Received HTTP response from the server, response code=500
    07:20:08 AM Error deploying archive sca_HelloSoa1_rev1.0.jar to partition "default" on server soa_server1 http://slc01mrt.us.oracle.com:8001
    07:20:08 AM HTTP error code returned 500
    07:20:08 AM Error message from server:
    There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: HelloSoa1 to service engine: implementation.bpel, for composite: HelloSoa1: ORABPEL-01005
    Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "HelloSoa1" of composite "default/HelloSoa1!1.0*soa_3764b7a8-b2ca-43ba-a289-1f8e281a50bc"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    07:20:08 AM Check server log for more details.
    07:20:08 AM Error deploying archive sca_HelloSoa1_rev1.0.jar to partition "default" on server soa_server1 http://slc01mrt.us.oracle.com:8001
    07:20:08 AM #### Deployment incomplete. ####
    07:20:08 AM Error deploying archive file:/scratch/jdev11117/jdevuserhome/mywork/MMSOAHello/HelloSoa1/deploy/sca_HelloSoa1_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    My BPEL has a Java Embedding I have posted the entire BPEL below:
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Thu Sep 12 22:41:52 PDT 2013
    Author: mmuppago
    Type: BPEL 1.1 Process
    Purpose: Synchronous BPEL Process
    -->
    <process name="HelloSoa1"
    targetNamespace="http://xmlns.oracle.com/MMSOAHello/HelloSoa1/HelloSoa1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/MMSOAHello/HelloSoa1/HelloSoa1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
    <bpelx:exec import="oracle.security.jps.*"/>
    <!--
    PARTNERLINKS 
    List of services participating in this BPEL process 
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="hellosoa1_client" partnerLinkType="client:HelloSoa1" myRole="HelloSoa1Provider"/>
    </partnerLinks>
    <!--
    VARIABLES 
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:HelloSoa1RequestMessage"/>
    <!-- Reference to the message that will be returned to the requester-->
    <variable name="outputVariable" messageType="client:HelloSoa1ResponseMessage"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC 
    Set of activities coordinating the flow of messages across the 
    services integrated within this business process 
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in HelloSoa1.wsdl) -->
    <receive name="receiveInput" partnerLink="hellosoa1_client" portType="client:HelloSoa1" operation="process" variable="inputVariable" createInstance="yes"/>
    <assign name="Assign1">
    <copy>
    <from expression="concat('Hello ', bpws:getVariableData('inputVariable','payload','/client:process/client:input'))"/>
    <to variable="outputVariable" part="payload"
    query="/client:processResponse/client:result"/>
    </copy>
    </assign>
    <bpelx:exec name="Java_Embedding1" version="1.5" language="java">
    <![CDATA[/*Write your java code below e.g.
    System.out.println("Hello, World");
    try {
    System.out.println("Hello from MM World");
    oracle.security.jps.util.SubjectUtil.getUserName(oracle.security.jps.util.SubjectUtil.getCurrentSubject());
    } catch(Exception ex) {
    System.out.println("Exception");
    ex.printStackTrace();
    }]]>
    </bpelx:exec>
    <!-- Generate reply to synchronous request -->
    <reply name="replyOutput" partnerLink="hellosoa1_client" portType="client:HelloSoa1" operation="process" variable="outputVariable"/>
    </sequence>
    </process>

    Hi,
    The problem you are referring above is definitely due to the java embedding you are using.
    This seems to be a simple Hello World example, and if you are looking for the same to work, you can simply use an assign activity to concat the input with the Hello world.
    If you are trying to use a java embedding activity which has some custom java coding in it, please refer to the following:
    Make sure all the dependent classes are explicitly mentioned with their packagename.ClassName.
    Also , make sure you make all the classes as jar and include it in sca-inf\lib directory of the code.
    a) See that your external / dependent Java applications dependent Jar files are copied in csa-inf/lib (e.g all jars like log4j, apache jars, wickets jar etc etc etc )
    b) also make sure u deploy the dependent java application as JAR using jdeveloper deploy wizard.... for example archive1.jar and then copy this jar as well in sca - inf / lib folder
    it will work ....
    Thanks,
    Deepak.

Maybe you are looking for