• RELEVANCY SCORE 3.96

    DB:3.96:Programs Will Not Compile That Have Seperate Classes k7




    I am trying to compile a program which has a seperate class, but it wont compile, it cant find the other class. I am compiling in the correct order, and I have tried re-compiling programs with seperate classes that I have done before, and they now wont compile. I tried compiling my program on my friends computer and it compiled fine.
    I am using jdk5.0 update 6 on Windows XP Pro
    Any help will be much appreciated

    DB:3.96:Programs Will Not Compile That Have Seperate Classes k7

    I'm just about out of ideas.

    Two things pop to mind:

    * Is javac a .bat file that sets up some environment or classpath before invoking javac.exe? Is there a reference to a zip file there?

    * In your ext directory (lib\ext under %JAVA_HOME% or %JDK_HOME% or %JRE_HOME%) is there a zip file?

    Other than that, I'm stumped. Good luck.

  • RELEVANCY SCORE 2.95

    DB:2.95:Oracle Driver Classes cp




    Does anyone know how to install the Orcale Driver classes, so that when i compile programs using
    those classes the javac compiler will be bale to find them, and if anyone knows, how to make
    this work with JBUILDER3 to that would be great!

    get back to me dirctely if possible @

    yuhanov@iprimus.com.au
    Thanks
    Leon

  • RELEVANCY SCORE 2.85

    DB:2.85:Help! pp





    what software should i donlowd to compile and run java programs , classes??

  • RELEVANCY SCORE 2.82

    DB:2.82:Compile All Programs After Installing Sp 3j



    Hi,

    is there a program or transaction to compile all SAP programs and classes after updating to a new service pack? So that not all actions (in RSA1) run for the first time need to be compiled.

    greets,

    Matthias

    DB:2.82:Compile All Programs After Installing Sp 3j


    Just want to clarify one thing here, does It necessarily run SGEN from 000 Client or 220,100 etc are enough?

    Please confirm.

    Thank.

    Chinna

  • RELEVANCY SCORE 2.81

    DB:2.81:Multiple Application Deployment za



    Hi,I have 2 applications. There are some classes that are common between the 2 applications. I have created 2 seperate ear for each application on seperate web contextsBut on accessing, it gives a duplicate class defnition error. I need to run these 2 applications on the same Jboss server.Thanks in advance

    DB:2.81:Multiple Application Deployment za


    Have a look at: -http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfigurationDo you have a jboss-app.xml in your ear? In this descriptor you can specify different loader repositories for both of the ears so their classes will be issolated from each other.

  • RELEVANCY SCORE 2.79

    DB:2.79:Noclassdeffounderror: In Struts Applilcation pd


    Hi All,

    I have created a small application (ear) in Struts and deployed in stand alone oc4j. The application works fine when I place all the "Action" classes under WEB-INF/classes folder.

    But when I take out all the Action Classes and make a seperate jar files ( one each for a module ) and then make an ear with all the jar files ( action classes ) and the war file ( without the action classes), when tried to access the application will throw the following error.

    java.lang.NoClassDefFoundError: org/apache/struts/action/Action

    Entry in struts-config.xml for one of the actions is as follows.

    action path="/NewRegistration"
    type="com.cs.actions.NewRegistration"
    validate="false"
    forward name="newRegistration"
    path="/case/Registration_New.jsp"
    redirect="false" /
    /action

    Note : In the server.xml, I have added the library path for the jar files referenced in the application.

    Please let me know where I am committing a mistake so that I can rectify.

    Thanks
    Jyothi

    DB:2.79:Noclassdeffounderror: In Struts Applilcation pd

    Jyothi,
    Did you modify the "orion-web.xml" file for your application (as mentioned in the white paper, I believe)? Mine has the following:

    lt;!-- Uncomment this element to control web application class loader behavior.
    web-app-class-loader search-local-classes-first="true"
    include-war-manifest-class-path="true" /
    --I'm not sure if manually editing this file is sufficient. I think you may need to manually edit the file and then re-deploy your application.

    Note that this is just a suggestion. I don't know if it will solve your problem.

    Good Luck,
    Avi.

    Message was edited by:
    Avi Abrami

  • RELEVANCY SCORE 2.77

    DB:2.77:Error On Java_System While Compiling Webutil.Pll d3


    Dear all,
    I m trying to configure webutil 1.0.6 with oracle forms 9.0.2.
    Acc. to release notes of webutil 1.0.6, webutil.pll may not compile in forms 9.0.2,
    particularly for the packages beginning with JAVA_ .

    And solution given in release notes is that such packages are imported from java classes using java importer and we will have to re-import them and rename those packages accordingly.

    Now my problem is
    1) Exactly Which of the classes are to be reimported .
    2) where these classes are located
    3) how to reimport them.

    Any kind of help will be appreciated.
    Thx in advance
    indu

    DB:2.77:Error On Java_System While Compiling Webutil.Pll d3

    Dear all,
    I m trying to configure webutil 1.0.6 with oracle forms 9.0.2.
    Acc. to release notes of webutil 1.0.6, webutil.pll may not compile in forms 9.0.2,
    particularly for the packages beginning with JAVA_ .

    And solution given in release notes is that such packages are imported from java classes using java importer and we will have to re-import them and rename those packages accordingly.

    Now my problem is
    1) Exactly Which of the classes are to be reimported .
    2) where these classes are located
    3) how to reimport them.

    Any kind of help will be appreciated.
    Thx in advance
    indu

  • RELEVANCY SCORE 2.76

    DB:2.76:Creating Jar File With Two Main Classes 3j


    I have a java project which contains two main classes and is essentially two separate programs within one project. Both programs share a lot of the same files and I do not want to have to maintain separate copies of each of these files. I want to compile a jar that contains only the files needed by the main class. For example, program 1 requires files A - G and program 2 requires files A, B, C, and H. How can I compile a jar for program 2 that includes only those 4 files as opposed to files A - H? Would I have to manually specify all the files required? I would think there should be some way to automatically figure out which files are needed by looking at the import statements and only including those files. Any help is appreciated!

    DB:2.76:Creating Jar File With Two Main Classes 3j

    Your approach is good - separating into two programs makes sense here.

    I would recommend using a build tool such as Ant or (my preferred option) Maven. They can seem a little daunting to get into, but they do make life simpler further on.

    Project structure is important too. Consider how you're laying out your packages. This can make development a lot easier.

    Also, consider creating libraries (non-executable JARs) that your program JARs can reference. If you package them functionally this would save you some effort. For example:

    Program1.jar (Main)
    + MyLib1.jar (A, B, C)
    + MyLib2.jar (D, E, F, G)
    Program 2.jar (Main, and H)
    + MyLib1.jar (A, B, C again)So then you build two libraries (MyLib1, and MyLib2) which contain the classes separated logically, then Program1 references MyLib1 and MyLib2 and its Main class, and Program2 references MyLib1, as well as its Main class and the H class you specified.

    The project layout for this can be as follows:

    project name
    + apps
    + program1
    + src
    + main
    + java
    + package tree (i.e. com/company/program
    + Main.java
    + program2
    + src
    + main
    + java
    + package tree (i.e. com/company/program
    + Main.java
    + H.java
    + components
    + mylib1
    + src
    + main
    + java
    + package tree (i.e. com/company/program
    + A.java
    + B.java
    + C.java
    + mylib2
    + src
    + main
    + java
    + package tree (i.e. com/company/program
    + D.java
    + E.java
    + F.java
    + G.java I hope this helps.

    Regards,

    G.

  • RELEVANCY SCORE 2.75

    DB:2.75:Compiling A Servlet That Uses Javabean 7x


    I have a servlet that will get data from a JavaBean which is created before in a jsp file. While I trying to compile the servlet I am getting this message:

    --------------------Configuration: JDK version 1.3 Default--------------------
    Command : "C:\jdk1.3\bin\javac.exe" -d "C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes" C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes\MyServlet.java
    Directory : C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes
    C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes\TasitKayitGirisi.java:19: cannot resolve symbol
    symbol : class SimpleBean
    location: class MyPackage.SimpleBean
    SimpleBean simpleBean = (SimpleBean) session.getAttribute
    ^
    ("simpleBean");

    C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes\MyServlet.java:19: cannot resolve symbol
    symbol : class SimpleBean
    location: class MyPackage.SimpleBean
    SimpleBean simpleBean= (SimpleBean) session.getAttribute("simpleBean");
    ^
    2 errors

    Process completed.

    Where is the problem. SimpleBean is successfully being initializing in my jsp file. But I couldn't compile my servlet that will get data from that bean. Both my servlet and bean are in the same package. I am using JCreator to compile servlets. I think the problem is the compile string that JCreator uses. Can you help me. Thx in advance.

    DB:2.75:Compiling A Servlet That Uses Javabean 7x

    Looks like an import Problem.
    The Compiler is not able to "see" the SimpleBean Class.

    Take care of the Classpath and your imports.

    Happy Coding. :-)

  • RELEVANCY SCORE 2.74

    DB:2.74:Vbean, Iview And Oracle.Forms.* Classes xm


    What do I have to do to extend/implement those classes? When I try to compile any of the classes in OTN Forms6i JavaBean demos I get an error telling me it cannot find oracle/forms/ path neither VBean or IView interfaces (classes). Any help will be appreciated.

    Cristian

    DB:2.74:Vbean, Iview And Oracle.Forms.* Classes xm

    This might be better answered in the Forms forum if there is one. However, there used to be an archive called f60all.jar
    that contained the class files necessary for compilation. You would have to include in your project the library that contained
    this archive, else create a new library containing it. It's possible that the archive name itself has changed if the version of
    forms has changed (e.g. fversionall.jar).

  • RELEVANCY SCORE 2.72

    DB:2.72:Cannot Compile Inner Classes z8


    I have java source files that were created in another IDE. Some of these source files contain inner classes. When I attempt to compile them in JDev9i, the inner classes are not output.

    Has anyone experienced this problem in JDev?

    DB:2.72:Cannot Compile Inner Classes z8

    Not that I know of. If you bought JDev, then you will probably get the update automatically. Else, just look at OTN weekly.

  • RELEVANCY SCORE 2.72

    DB:2.72:Problem With Java Classes aa


    i have made some java files in java project but when i compile the files
    it gives me error " error 300 : classes are not found "
    should the classes be created automatically or i have to create them

    i will post more info if necessary

    DB:2.72:Problem With Java Classes aa

    Are you using an IDE? Are you just starting with Java? If so, it's generally recommended to not start with IDEs because you tend to miss learning about some basic fundamentals.

    As for obvious problems.... I'm not sure these aren't just cuz you posted them here wrong, but I'm not going to assume that...

    If the file is driver.java, the class name has to be driver, not Driver. It's case sensitive. The public class name (I say public cuz you can define multiple classes in one java file) has to have the same name as the java file. So that could cause problems.

    The other thing is what you set up in the CLASSPATH system variable. If you don't know what this is, you should go here:
    http://java.sun.com/docs/books/tutorial/
    and start reading from the begining.

  • RELEVANCY SCORE 2.72

    DB:2.72:Got Stuck Trying To Extend Unityplayeractivity Following Example In Unity Documentation. 7p



    Then add classes.jar to the classpath used to compile the new Activity.


    This sentence means that you need to add a reference to classes.jar to compile arguments when compiling your java classes. classes.jar file is located in Unity Editor subfolders. I assume you're doing something like this to compile your activity:

    javac MyActivirty.java -d .



    You need to classes.jar to that:

    javac MyActivirty.java -classpath /Path/To/Classes/Jar/classes.jar -d .



    If you need to add extra jars to classpath, you have to separate them using : symbol:

    javac MyActivirty.java MyOtherClass.java -classpath /Path/To/Classes/Jar/classes.jar:/AnotherPath/another.jar -d .



    If you need to add Android java classes add bootclasspath argument:

    javac MyActivirty.java MyOtherClass.java -bootclasspath /Path/To/AndroidSDK/android-sdk-mac_86/platforms/android-11/android.jar -classpath /Path/To/Classes/Jar/classes.jar:/AnotherPath/another.jar -d .



    I hope this will get you going.

    DB:2.72:Got Stuck Trying To Extend Unityplayeractivity Following Example In Unity Documentation. 7p


    Then add classes.jar to the classpath used to compile the new Activity.


    This sentence means that you need to add a reference to classes.jar to compile arguments when compiling your java classes. classes.jar file is located in Unity Editor subfolders. I assume you're doing something like this to compile your activity:

    javac MyActivirty.java -d .



    You need to classes.jar to that:

    javac MyActivirty.java -classpath /Path/To/Classes/Jar/classes.jar -d .



    If you need to add extra jars to classpath, you have to separate them using : symbol:

    javac MyActivirty.java MyOtherClass.java -classpath /Path/To/Classes/Jar/classes.jar:/AnotherPath/another.jar -d .



    If you need to add Android java classes add bootclasspath argument:

    javac MyActivirty.java MyOtherClass.java -bootclasspath /Path/To/AndroidSDK/android-sdk-mac_86/platforms/android-11/android.jar -classpath /Path/To/Classes/Jar/classes.jar:/AnotherPath/another.jar -d .



    I hope this will get you going.

  • RELEVANCY SCORE 2.71

    DB:2.71:Help With Programming On Windows Xp sa


    I recently bought a laptop that has windows xp on it. All of my classes compile on it. The problem is that when I write a main class that calls upon the others it will not compile. It tells me that all the members that I refered to in other classes are unrecognizable. It's like it will compile classes seperately, but will not reference between classes. Can anyone help with this problem. I should say that these classes work flawlessly on windows 98. thanks for your help

    mael

  • RELEVANCY SCORE 2.69

    DB:2.69:Re: Package, Public Class And Files... mz


    Because when you have a non-trivial project you need some way of locating the source code for a class. Just putting all 475 classes into a single file isn't going to be a good strategy. It's not scalable, if you want a buzzword.

    Also it allows the compiler to identify pieces of source code which have been changed since they were compiled. The javac compiler will identify all classes which are referenced by a class X, and when you ask it to compile X, it will also compile all referenced classes whose source is newer than their compiled version. It couldn't do that if the source code were in randomly-named files. Again, that's a helpful thing for a non-trivial project.

    DB:2.69:Re: Package, Public Class And Files... mz

    If I remember correctly its not a specification limitation, however its a requirement by the javac compiler. And rightly so cause it would be a maintainability nightmare if a java file named Foo.java gets compiled into Bar.class just cause the class was named Bar.

  • RELEVANCY SCORE 2.69

    DB:2.69:Compile Problem (Need Help!) xd


    I hang on this Problem since 12 Hours !!!
    I have a JAR file that contains Classes in the root folder of the Package. This Classes have no package.

    I cant compile against this Classes
    Thats my Problem !!!!
    Other classes in subdirectories in the JAR that uses packages can i rererence with javac.
    (Of course the Package is in the Classpath of the compiler!)

    DB:2.69:Compile Problem (Need Help!) xd

    Yes, but this is not relevant. I use separate class and source directorys.

    /src/nite/gram/gui....SOURCEFILES
    /bin/nite....... here are the CLASSES compiles
    under
    /bin/Sonogram.jar is the JAR file that contains the Classes in the root directory.

    I try all configuration stuff like JAR file in the root folder (and change the make file...)

    here is my actual make file:

    javac -classpath /bin/Sonogram.jar /nite/gram/gui/*.java -d bin

  • RELEVANCY SCORE 2.69

    DB:2.69:Glujan@Uswest.Net pf


    i've uninstalled my microsoftword and excel programs thinking that i may have changed the glopel tamplate.
    i use these a lot I can't find the cd that i thought should have come with my computor. will I need to purchase a new one, are the seperate cd's and what programs will i need?

    DB:2.69:Glujan@Uswest.Net pf

    i've uninstalled my microsoftword and excel programs thinking that i may have changed the glopel tamplate.
    i use these a lot I can't find the cd that i thought should have come with my computor. will I need to purchase a new one, are the seperate cd's and what programs will i need?

  • RELEVANCY SCORE 2.68

    DB:2.68:Problem Reading Other Classes xj


    I've installed j2sdk1.4.0_02 and set the path correctly to point to bin.

    Now when I compile a file, it will not compile if I make an instance of another class. That class is in the same directory, I've tried re-installing and I get the same problem, all my old programs which I know worked under 1.3 are now giving me the same compile problem on them when I call and instance of another class,

    I get a
    cannot resolve symbol
    symbol : class Gui
    location : class Project

    so when I compile Project.java it doesn't see my Gui class eventhough it is there, and Gui compiles fine.

    any ideas????

    DB:2.68:Problem Reading Other Classes xj

    yeah I figured it out, 1.4 little different, I have some of my own class files that I had set in the class path, usually I don't set the class path, only the path, so everything in every directory works, after I modified it though it was only looking at my 2 class files I had, thanks for the input though

  • RELEVANCY SCORE 2.68

    DB:2.68:Tomcat Shared Dir Problem mp


    Hello Guys,

    I have a problem with the shared directory of the tomcat.
    I have 2 webapplication and I want to share some class over the
    shared dir. I put a class and a package 'myapp' with some classes in the shared/classes directory. Now, I want to use the class in my Webapps.
    I set the classpath to the shared/classes dir and compile my files.
    During compilation I get an error message. The problem is(I think) that the classes within the package 'myapp' will be found and the class file (test2.class) outside the package will not be found. What is my mistake ?

    The directory structure:
    /shared/classes/myapp/test.class
    /shared/classes/test2.class

    Best Regards
    Mario

    DB:2.68:Tomcat Shared Dir Problem mp

    : cannot resolve symbol
    symbol : class test
    location : portal.login.LoginActionThe only cause I can think of is a wrong package declaration in class test; check spelling.
    Another problem may be some error in the code which calls the test class; sometimes you get this error but in fact the trouble is a missing parenthesis or semicolon or something...

    I think the problem is that I want to use a class
    under common/classes or shared/classes without having
    these class in a package.That's not a problem, I always use classes outside packages and never have troubles (I know it's not a good idea, but sometimes my classes just grow there!).

    Other way around :
    How can I use classes from an other webapp ?As far as I know you can't; if you want to share classes you'll have to put them in common/ or shared/

    Hope this helps, regards,
    Riccardo

  • RELEVANCY SCORE 2.68

    DB:2.68:Compilation Problem 7f


    Hi,

    I'd like to know if it's possible to make it so that JDeveloper still builds classes even if 1 or 2 classes have errors in them.

    I check out a large CVS repository and sometimes there are other developers checking in classes that may have an error in.

    If I use Eclipse to compile, it will show the errors, but the rest get built. In JDeveloper (1012 and 1013) it copies xml files etc across but fails to copy and compiled classes.

    This is also a problem as some of the classes have 1.5 code in them so obviously come up with errors in JDev 1012 - I'm happy to ignore them as I don't use them but again would like the rest to be built.

    Any ideas?

    Thanks,
    Andy

    DB:2.68:Compilation Problem 7f

    We are planning to support this scenario (being able to run even when classes have errors in them) around the 10.1.3 production time frame.

  • RELEVANCY SCORE 2.68

    DB:2.68:Compiler Question Related To The Instanceof ks


    Hi Everyone,

    I have come across a paragraph in a book that is a little confusing, I am hoping that somebody out there will be able to help clarify what is meant:

    "Some compilers, such as Sun's JDK, will not allow code to compile if they can determine with the available classes that a particular object cannot possibly inherit from a class specified in instanceof."

    Does this mean that if you test for an instanceof which is false the class will not compile? I don't get this. Any explenations will be greatly appreciated.

    Thanks

    Regards

    Davo

    DB:2.68:Compiler Question Related To The Instanceof ks

    the instanceof test requires a lot of runtime, thats why the compiler already tells u that test will fail.

    sometimes its even better to put the cast in a try-catch block and handle exceptions.

  • RELEVANCY SCORE 2.68

    DB:2.68:Classes / Methods Not Found At Deployment Time p7



    Hello friends.

    I have several classes, some are servlets, others are standalone classes. They
    all compile fine in Eclipse. They all compile at the command line with wlcompile.
    However, when I attempt to deploy the .ear file I get NoSuchMethodErrors in a
    few servlets that reference my stand alone classes.

    Any insight or advice is appreciated.
    Thanks.

    brian

    DB:2.68:Classes / Methods Not Found At Deployment Time p7

    No, wldeploy isn't touching your class. I suspect the server is finding
    an older version of one of your classes. That's why I asked about other
    versions of the class.

    My first guess is a stale copy of your class is being found by one of
    the server's temp directories.

    Try shutting down the server and deleting the .wlnotdelete directory
    (it's in your server's home directory).

    If that doesn't help, post again and I'll offer some other suggestions.

    -- Rob

    Brian wrote:
    Hello friends. I am taking no special actions in regards to class loading. Likewise
    I have determined that the class has not been loaded into the system classpath.
    Looking up the description for NoSuchMethodError, sun tells me that

    "this error can only occur at run time if the definition of a class has incompatibly
    changed. "

    The question now arises, it is possible that the wldeploy task is for some reason
    changing my class?

    Any help is greatly appreciated. Thank you.
    brian

    Brian" brian.scott@ncgicorp.com wrote:

    Hello friends.

    I have several classes, some are servlets, others are standalone classes.
    They
    all compile fine in Eclipse. They all compile at the command line with
    wlcompile.
    However, when I attempt to deploy the .ear file I get NoSuchMethodErrors
    in a
    few servlets that reference my stand alone classes.

    Any insight or advice is appreciated.
    Thanks.

    brian

  • RELEVANCY SCORE 2.67

    DB:2.67:Jext - Just An Editor? sm


    I downloaded JEXT. I brought up some code I have written. It brings it up in all these nice colors. Seems like the indentation is automatic. Nice.

    I read through the documentation. It appears that JEXT is just that - an editor, nothing more, correct?

    To compile my programs (or should I say classes????) I need to do it as I always have been doing? I compile all my programs from the DOS screen. Nothing very big yet, still getting basics down.

    Another question would be eventually I won't be able to compile all my programs from the DOS screen or won't want to. Will I be using a tool of some kind?

    Previous to JEXT, I wrote my programs in notepad, saving as java file and compiled from DOS. Learning to use JEXT is enough of a learning curve for me right now along with learning java. I guess I am looking for a little guidence in what could be coming up or what should be coming up.

    Thanks in advance for your advice.

    DB:2.67:Jext - Just An Editor? sm

    Thank you for the advice.

    I'll take a look at both jedit and jcreator. I guess I thought it was more of an inconvenience to go back and forth between DOS and the editor (what ever it is) than notepad and DOS. But then, if one gets to know the editor as well as notepad, it would be the same thing. Also hoping the indentation and the colors will help me identify things and learn faster.

  • RELEVANCY SCORE 2.67

    DB:2.67:Why Will Netbeans Will Not Recognise Any Of My Added Librarys md


    I have installed the IAIK and BCEL librarys, they are recoginised when I compile using command prompt but Net Beans cannot find them?

    So if I compile using command prompt I will get no errors but if I compile using net beans I will get plenty if I use classes or methods form these librarys.

    Is there any reason for this? What can I do to solve this?

    DB:2.67:Why Will Netbeans Will Not Recognise Any Of My Added Librarys md

    I was able to add the JAR's to the program, thanks evryone for the help

  • RELEVANCY SCORE 2.66

    DB:2.66:Re: How To Call Instantiable Classes? ps


    The CLASSPATH is set on said directory - like I said, I can compile other programs, just not ones that call other classes.

    DB:2.66:Re: How To Call Instantiable Classes? ps

    jschell, thanks - I deleted the spaces and now it compiles and calls ins. classes fine; didn't believe I had to watch my syntax that closely.

    L.

  • RELEVANCY SCORE 2.66

    DB:2.66:Compiling Simultaneously Two Classes Referencing Each Other p8


    Hi,
    When we want to compile 2 classes simultaneously in a package, we give command --
    javac package-name/*.java
    Suppose the two classes are ClassA and ClassB and ClassA has a reference of ClassB. So the compiler will finish compiling ClassB before compiling ClassA.
    But, if both the classes have each others' reference, how does compiler resolve this? Because, even in that case both classes get compiled

    Regards,
    Amit

    DB:2.66:Compiling Simultaneously Two Classes Referencing Each Other p8

    Lets say that compilation is done in 2 steps.
    The first step is done for all files first.
    Then the second step is done for all files.

    That means that for the second step the compile-time resolution has takes place.
    Two classes that refers to each other must go through the first step in
    the same compilation so that in the second step when
    they are referring to each other they are easily resolved.

    This is different from runtime resolution.

  • RELEVANCY SCORE 2.66

    DB:2.66:How Do You Compile A Subclass? cd


    Can anyone help in answering the following question regarding inheritance?

    I have two classes one extending the other. When I put both classes into a single file and run the javac command to compile them the compilation takes place and no errors are given.

    However if I place the classes into seperate files and compile the superclass first and then the subclass. The superclass compiles but the subclass compilation fails with a cannot recognise symbol (superclass name) error.

    I have a workaround which is to compile both classes at the same time using javac *.java. However would like to know the reasons why the compilation fails and if there is a correct way to resolve this problem.

    As extra info the class files are sitting within the same directory on my machine.

    Any help greatly appreciated

    DB:2.66:How Do You Compile A Subclass? cd

    It might not be the classpath. If running javac
    *.java works, that means that both directories
    containing the files can 'see' each other. I don't
    think it would have worked at all if your classpath
    wasn't set correctly.That's wrong.
    If you run javac *.java, then you have made each .java
    file in the current directory explicitely available to
    the compiler.

    There is no such thing as directories being able to
    'see' each other - it is the compiler that needs to be
    able to 'see' the files and directories that your
    files are in.
    The compiler can 'see' the files whose names you pass
    in on the command line, and the directories and files
    that are in your classpath. If your classpath does not
    contain the directory that the superclass .class file
    is in (whether or not it is the current directory),
    then the compiler will give the posted error.Have updated the classpath and things are now working as I'd expected. Thanks for your help and good background info.

  • RELEVANCY SCORE 2.65

    DB:2.65:Tomcat And Classes xf


    hi,

    do i have to compile classes that i create to use in my jsp, before i put them to /classes directory of tomcat? sometimes i have to but sometimes tomcat compiles them itself. what is the key point here?

    DB:2.65:Tomcat And Classes xf

    What's going on is that when tomcat is directed to a jsp it checks if it's already converted it to java and compiled it and, if not, runs a translater and then javac. javac, if it can't find a .class file, will compile other java files into class files when it finds an appropriate one. If things are nice and straighforward this works.

    Personally I don't count on it. In fact I wouldn't put the java source under the tomcat directory at all, but compile with -d or move them there once I successfully compile a version.

  • RELEVANCY SCORE 2.64

    DB:2.64:Accessing Classes 38


    Hi,

    I am facing a problem with accessing classes. I have class that plays an audio as a seperate class. And in my main application holds two classes, Inwhich i want to load the audio class for a button event. How should it can be done?. The audio class doesnt have any methods.

    Regards..

    DB:2.64:Accessing Classes 38

    Object obj = Class.forName("mypackage.MyClass").newtInstance();
    If you don't need an object forName will do.

  • RELEVANCY SCORE 2.64

    DB:2.64:Wouldn't Compile 17



    Hello, I have problem compiling java classes that are in a package. Every time I try to compile a java file that extends another class, the DOS window gives me error messages. It points out those classes that are being imported.

    Could please tell me how to compile it so that it can see other dependent classes.

    Thanks for your help.

    DB:2.64:Wouldn't Compile 17

    BATCH files does a bunch of things you. These things could be repeative tasks or something uttly boring you cant be arsed to do it over and over again. Ok on with exerice.

    If YOU have windows 98/95 or some MSDOS you can wot i am about to show read on if you have:

    Two things i need to show you.

    1) 101 batch files explained
    2) how you compile with batch files.

    Ok here is a QUICK 101 on BATCH files in windows.

    1) Open up a a new text editor and then add the following

    ---Start of batch file---
    rem This is a comment it gets ignored.
    rem
    rem the "rem" in the middle is a BLANK.
    mkdir c:\testdir
    SET MYTEMPPATH=C:\testdir
    echo "MY MYTEMPPATH="%MYTEMPPATH---End of batch file---

    2) Save it as "c:\btest.bat"

    3) Make sure it is a "btest.bat" as some programs adds more extensions like "btest.bat.txt"

    3) Run it as if it was an executable. Browse for it in some explorer and run. You will lots of text pop up and that ECHO.

    4) Check your c:\ harddrive. You will see testdir made.

    OK ON WITH COMPILING!
    1) Start simple. Make java file and save it as "mybtest.java". Save it into "c:\testdir" directory.
    public class mybtest {
    public void main(String[] args) {
    System.out.println("Hellow world BTEST");
    }
    }2) Compile manually by running the following command
    "c:\j2sdk1.4.2_01\bin\javac -classpath c:\testdir mybtest.java"

    Basically you are telling javac where to find the .java files to compile. As there is only one file in one directory, i have only declared c:\testdir

    It should compile. If it has check the c:\testdir to make sure the .class exists.

    Run "c:\j2sdk1.4.2_01\bin\java c:\testdir\mybtest.java" to see the java program work.

    3) Edit your test batch file i asked you to make. Get rid of all the lines in there. Then put in the following.
    rem---START BATCH COMPILER----
    set MYAPPPATH=c:\testdir
    c:\j2sdk1.4.2_01\bin\javac -classpath %MYAPPPATH% mybtest.javarem---END OF MY NEW BATCH COMPILER------

    4) Save it
    5) Edit your "btest.java" make it show something different.
    public class mybtest {
    public void main(String[] args) {
    System.out.println("Hellow world compiled by a batch file");
    }
    }6) Save it and then go run that c:\btest.bat

    7) Check it has worked by runing
    "c:\j2sdk1.4.2_01\bin\java c:\testdir\mybtest.java" to see the java program work.

    You should see it has worked.

    HOW THAT BATCH FILE WORKED(if it has worked for that matter)
    "rem [SOME STATEMENT you want to show during batch] "Comment command

    "set MYAPPPATH=c:\testdir"This sets up a variable called MYAPPPATH with the data "c:\testdir"

    "c:\j2sdk1.4.2_01\bin\javac -classpath %MYAPPPATH% mybtest.java"The batch will prepare the variables and run the command. It calls up your variable data by using %[variablename]% it echos out that data.

    If you dont have a clue what i am saying still, try look up in google "batch processing [you operating system make]" If all else fails. Try reading

    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

  • RELEVANCY SCORE 2.64

    DB:2.64:Compiling Packages a3


    If I'm compiling a package (say com.mycompany.mypackage) with several classes that reference each other, then I assume I have to compile that entire package at one time. In other words, if I have 3 classes (OneClass.java, TwoClass.java and ThreeClass.java), and OneClass has a method that returns a TwoClass object, it is not possible to compile TwoClass.java then compile OneClass.java.

    Am I correct in this assumption?

    DB:2.64:Compiling Packages a3

    If I'm compiling a package (say
    com.mycompany.mypackage) with several classes that
    reference each other, then I assume I have to compile
    that entire package at one time. In other words, if I
    have 3 classes (OneClass.java, TwoClass.java and
    ThreeClass.java), and OneClass has a method that
    returns a TwoClass object, it is not possible to
    compile TwoClass.java then compile OneClass.java.

    Am I correct in this assumption?Todd Run: u had confused me . it is possible to compile either one of the class first.the java compiler takes care of compiling the other classes if any referenced class is not found.I always compile the packages by giving the main program name and Javac does the rest. cool, is not it. If there is no main program, then i give *.java to compile all the java files in a package. cool is not it.

    it is ur classpath settings which needs to be set properly.

    Say u are in the directory c:\todd and u have a package com.mycompany.mypackage. set the classpath to c:\todd. that would give access to ur package from any directory u are in.
    Now to compile all the files in a package, give the following command.Ofcourse, you have to repeat for every package
    c:\todd\javac com\mycompany\mypackage\*.java
    c:\todd\javac com\mycompany\mypackage1\*.java

    Oh shuck. u have to repeat it for every package. well there is another and a simple one command option if you have not more than 50 files, more that 50 takes a long time to compile.copy all the java files to c:\todd and give the command as
    c:\todd\javac -d . *.java bingo...

    let me know if u need further help.

  • RELEVANCY SCORE 2.63

    DB:2.63:Ejb Environment pm



    Not sure if this belongs in this forum, but it seems like a reasonable choice.

    My question is involving the environment for WLS 6.1; specifically involving EJBs.
    I'm sure this has been discussed before. I did a quick search and had no luck,
    however.

    During our build process, we compile our EJB classes directly into the class path
    ("./serverclasses" directory under WLHOME) where the rest of the classes are compiled.
    If I'm not mistaken, any client of an EJB is going to require those classes (at
    least the remote interface?) in the classpath in order to compile itself.

    The problem we have is that when WLS starts, the warnings come up that the bean classes
    should not be in the classpath. I could remove them, but that's a little painful.
    If I do go to the pain of removing them, do I not have to place the EJB's .jar
    file in the classpath prior to starting the server? That seems a little tedious
    to have to modify the server's classpath each time I deploy a new EJB. If I don't
    have the .jar in the classpath, will clients to the EJB that run in the server work?

    Any thoughts you may have as to build process (seperate class path for build versus
    server run, etc) would be most appreciated.

    Thanks!

    Brian

    DB:2.63:Ejb Environment pm


    Hi,

    I would advise not to use the standard EJB compile/generate scripts(ANT/batch files)
    that come with Weblogic. Are you deploying your application as an EAR file. Classloader
    would be different in that case. If not, you could try like this
    1) If you have RMI remote clients for your EJBS you need Home and Remote interfaces
    for EJB call. Otherwise if servelts/JSP on the same server use, you do not.
    2) I am not 100% sure, but server startup classpath sould have only those classes
    that your Remote or Home interface extends. Otherwise every thing at say WEB-INF/classes
    would be visible and work. This is based on my experience. So if your EJB say remote
    interface does not extents anything, you need nothing extra at you Weblogic startup
    classpath.
    3) The templates have concept of serverclasses and clientclasses which is only relevant
    for Weblogic examples (I guess inherited from Weblogic5.1x which was not J2EE complient.
    Hope this helps
    Regards
    HS

    "Brian Snyder" brian.snyder@thehartford.com wrote:

    Not sure if this belongs in this forum, but it seems like a reasonable choice.

    My question is involving the environment for WLS 6.1; specifically involving
    EJBs.
    I'm sure this has been discussed before. I did a quick search and had
    no luck,
    however.

    During our build process, we compile our EJB classes directly into the class
    path
    ("./serverclasses" directory under WLHOME) where the rest of the classes
    are compiled.
    If I'm not mistaken, any client of an EJB is going to require those classes
    (at
    least the remote interface?) in the classpath in order to compile itself.

    The problem we have is that when WLS starts, the warnings come up that the
    bean classes
    should not be in the classpath. I could remove them, but that's a little
    painful.
    If I do go to the pain of removing them, do I not have to place the EJB's
    .jar
    file in the classpath prior to starting the server? That seems a little
    tedious
    to have to modify the server's classpath each time I deploy a new EJB.
    If I don't
    have the .jar in the classpath, will clients to the EJB that run in the
    server work?

    Any thoughts you may have as to build process (seperate class path for build
    versus
    server run, etc) would be most appreciated.

    Thanks!

    Brian

  • RELEVANCY SCORE 2.63

    DB:2.63:Re: Binding Fault With Wsif Java Binding a9


    Have you defined the build.xml file for this properly?
    build.xml that has been used for the sample is attached:
    ?xml version="1.0"?
    !-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Run obant on this file to build, package and deploy the
    JavaBindingSample BPEL process
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --
    project name="JavaBindingSample" default="all" basedir="."

    !-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Name of the domain the generated BPEL suitcase will be deployed to
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --
    property name="deploy" value="default"/

    !-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    What version number should be used to tag the generated BPEL archive?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --
    property name="rev" value="1.0"/

    target name="compile"
    schemac input="${basedir}/HelperService.wsdl" binding="type" out="${home}/system/classes"/
    javac srcdir="${basedir}/src" destdir="${home}/system/classes"/
    /target

    target name="JavaBindingSample"

    bpelc home="${home}" rev="${rev}" deploy="${deploy}" /
    /target

    target name="all" depends="compile,JavaBindingSample"/
    /project

    Please verify that system/classes contains all the required compiled classes in your configuration.

    DB:2.63:Re: Binding Fault With Wsif Java Binding a9

    As I mentioned before that this feature is not completed and there may be some rough edges.

    Could you please pass me [ rakesh.saha@oracle.com] your whole process for investigation.[ rename zip to zipr]

    Thanks,
    Rakesh

  • RELEVANCY SCORE 2.63

    DB:2.63:Javac In Jdk1.3 (Help!!!) z1


    I have a basic doubt.....

    there seems to be 2 files: javac and oldjavac in 1.3....i would like to know this - if i use oldjavac in 1.3 will it follow the compilation procedure as if it were compiling in 1.2?

    Also assuming we have 2 packages that use each others classes, it looks like i wd have to compile both packages independently ( unlike 1.2 where dependency classes were compiled automatically).....now my problem is that when i compile the first package it says the second's classes are not found and vice versa......

    How do is solve this.....

    DB:2.63:Javac In Jdk1.3 (Help!!!) z1

    Hi,
    Could you just give the code of two packages . So that i will hit the nutshell and let you know the reason why it is not compiling

    Arvind H

  • RELEVANCY SCORE 2.63

    DB:2.63:Class Compiles In Eclipse Ide Just Fine But When Done In Cmd Line Does Not. 7f


    Alright, so I have this class, which is posted below. When I compile it via Eclipse(by running another program that instantiates it), it works fine, and indeed, it only accesses objects in it's own package, BHEngine, and these classes are public. Heck, I thought nothing was wrong with it because Eclipse never had any problems with it.

    Today, I tried to compile this same class from the command line (Running a Mac OS so using Darwin) and I get the error list which will be shown after the class.

    package BHEngine;
    import userscripts.player1.*;
    import BattlehardFunctions.*;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    public class PlayerScript implements Runnable {
    Player player;
    Thread t;
    public PlayerScript(Player player) {
    this.player = player;
    t = new Thread(this);

    t.start();}
    public void run() {
    for(;;) {

    try {t.wait(1000); } catch(InterruptedException exc) { System.out.println("Error."); }
    String hobojeebies[];

    do {
    hobojeebies = GodGenerator.returnStringArrayFromFile("/users/arkavon/documents/programs/workspace/BattlehardAIWars/db/" + player.username + "/script.txt");
    } while(hobojeebies[0].equals("load again"));
    if(hobojeebies[0].equals("load Revelations")) {
    BattlehardFunctions bf = new BattlehardFunctions(player.God,player);
    Revelations R = new Revelations(bf);

    try {FileWriter fw = new FileWriter("/users/arkavon/documents/programs/workspace/BattlehardAIWars/db/" + player.username + "/script.txt");fw.write("loaded.");fw.close();
    } catch (IOException exc) { }

    }}
    }
    }Here are the errors:

    Script.java:2: package userscripts.player1 does not exist
    import userscripts.player1.*;
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:3: package BattlehardFunctions does not exist
    import BattlehardFunctions.*;
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:8: cannot find symbol
    symbol : class Player
    location: class BHEngine.PlayerScript
    Player player;
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:10: cannot find symbol
    symbol : class Player
    location: class BHEngine.PlayerScript
    public PlayerScript(Player player) {
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:38: cannot find symbol
    symbol : variable GodGenerator
    location: class BHEngine.PlayerScript
    hobojeebies = GodGenerator.returnStringArrayFromFile("/users/arkavon/documents/programs/workspace/BattlehardAIWars/db/" + player.username + "/script.txt");
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:41: cannot find symbol
    symbol : class BattlehardFunctions
    location: class BHEngine.PlayerScript
    BattlehardFunctions bf = new BattlehardFunctions(player.God,player);
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:41: cannot find symbol
    symbol : class BattlehardFunctions
    location: class BHEngine.PlayerScript
    BattlehardFunctions bf = new BattlehardFunctions(player.God,player);
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:42: cannot find symbol
    symbol : class Revelations
    location: class BHEngine.PlayerScript
    Revelations R = new Revelations(bf);
    ^
    /users/arkavon/documents/programs/workspace/BattlehardAIWars/src/BHEngine/PlayerScript.java:42: cannot find symbol
    symbol : class Revelations
    location: class BHEngine.PlayerScript
    Revelations R = new Revelations(bf);

    So I am wondering why one compiler doesn't realize I have imported the correct packages and the other does? What's wrong here?

    Thank you!

    DB:2.63:Class Compiles In Eclipse Ide Just Fine But When Done In Cmd Line Does Not. 7f

    Go here and read how Java finds User Classes [http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html] If you still have questions/problems, post what you tried.

  • RELEVANCY SCORE 2.62

    DB:2.62:Flash 9/As3 - Will It Support Mx.Core.Uicomponent? ad


    Flash 9 is unable to compile classes that extend UIComponent
    when using ActionScript3. Not only that but it can't compile
    anything that uses the mx.rpc.soap classes either, and possibly
    nothing from the mx line of classes(?). Have these capabilities
    been forever transferred to flex? or are there a bunch of classes
    waiting to be put into Flash 9 beta? Or, is there some trick to
    accessing the flex versions of these classes in Flash?

    DB:2.62:Flash 9/As3 - Will It Support Mx.Core.Uicomponent? ad

    Flash 9 is unable to compile classes that extend UIComponent
    when using ActionScript3. Not only that but it can't compile
    anything that uses the mx.rpc.soap classes either, and possibly
    nothing from the mx line of classes(?). Have these capabilities
    been forever transferred to flex? or are there a bunch of classes
    waiting to be put into Flash 9 beta? Or, is there some trick to
    accessing the flex versions of these classes in Flash?

  • RELEVANCY SCORE 2.62

    DB:2.62:Re: Synchronized Static Initalizer x7


    I was almost to post the same thing as you , butthe
    monitor is per instance, not per reference :Yes, but if two seperate classloaders each load that
    class, then you will have two instances of that class.Having read that again, "instances" is not the correct term. I think this is more accurate:

    "Yes, but if two seperate classloaders each load that class, then you will basically have two different classes"

    DB:2.62:Re: Synchronized Static Initalizer x7

    synchronize more safely), but not for the reason you
    give Sylia. Since 1.2, Javadoc should not beHmm...

    On the evidence, it seems that I noticed this in 1.1, and failed to notice that it disappeared subsequently. Apologies to all for this misdirection.

    However the reasons given by others for avoiding the synchronized method construct are valid.

    Sylvia.

  • RELEVANCY SCORE 2.62

    DB:2.62:Re: How Should I Compile And Run My Jdbc Application ? 77


    Miguel231152 wrote:
    I need help about how is the correct way for compile and run my application conecta.java using a driver postgresql-8.3-603.jdbc3.jar for connect to my database under Postgresql 8.1.4, . I have compiled as follow :
    javac -cp postgresql-8.3-603.jdbc3.jar conecta.javaActually, you probably don't need the JAR in the CLASSPATH to compile. You shouldn't refer to PostgreSQL classes in your code, just java.sql interfaces.

    and I have compiled with sucessful obtaining conecta.class
    but when I try using :
    java conectaGotta have the JAR in the CLASSPATH at runtime. That's why you get that exception, and that's always what it means.

    a message display an error :
    java.lang.ClassNotFoundException: org.postgresql.Driver
    I didn find the cause , I try modifing the classpath onto .bash_profile :

    # User specific environment and startup programs
    JDK_HOME=/usr/local/jdk1.5.0_01
    JAVA_HOME=/usr/local/jdk1.5.0_01
    PATH=$JAVA_HOME/bin:/usr/lib/pgsql/bin:$HOME/bin:$PATH:.
    CLASSPATH=$JAVA_HOME/lib/postgresql-8.3-603.jdbc.jar:$CLASSPATH.Useless. Java ignores CLASSPATH environment variable.

    export PATH CLASSPATH JAVA_HOME JDK_HOME
    unset USERNAME

    but the message is the same . I have downloaded the driver into the same directory where is sited concecta.class and conecta.java . I don't understand why netbeans works fine runnning my application. I will be glad if anybody help to me.
    ThanksUse the -classpath option at runtime. That'll fix it.

    %

    DB:2.62:Re: How Should I Compile And Run My Jdbc Application ? 77

    I need help about how is the correct way for compile and run my application conecta.java using a driver postgresql-8.3-603.jdbc3.jar for connect to my database under Postgresql 8.1.4, . I have compiled as follow : javac -cp postgresql-8.3-603.jdbc3.jar conecta.java and I have compiled with sucessful obtaining conecta.class but when I try using : java conecta a message display an error : java.lang.ClassNotFoundException: org.postgresql.Driver I didn find the cause , I try modifing the classpath onto .bash_profile : # User specific environment and startup programs JDK_HOME=/usr/local/jdk1.5.0_01 JAVA_HOME=/usr/local/jdk1.5.0_01 PATH=$JAVA_HOME/bin:/usr/lib/pgsql/bin:$HOME/bin:$PATH:. CLASSPATH=$JAVA_HOME/lib/postgresql-8.3-603.jdbc.jar:$CLASSPATH. export PATH CLASSPATH JAVA_HOME JDK_HOME unset USERNAME but the message is the same . I have downloaded the driver into the same directory where is sited concecta.class and conecta.java . I don't understand why netbeans works fine runnning my application. I will be glad if anybody help to me. Thanks

  • RELEVANCY SCORE 2.62

    DB:2.62:Re: Doubt!! 3f


    hi,
    thanx for the reply.
    the main point here is that-
    I have three classes/programs.
    Now, i have made another class or the fourth one named Introduction
    In this program, when i compile it and i open the terminal window for this, i should be able to access the other three classes- in the sense
    I give you three choices like, in a game you have an option to play, to check settings and to exit.
    Just like that the user can choose any one of the programs which are given as choices.
    Now my doubt is ---- how do I do that .i.e. accessing all the 3 programs from the 4th one.
    yours,
    asha

    DB:2.62:Re: Doubt!! 3f

    "I have a doubt" means "I am having trouble believing something". If the person has trouble believing something, that's fine. But that really doesn't belong here.... do your own test.

    Unfortunately, that's not what these people mean. I have a doubt about these's people poor grasp of the word doubt.

  • RELEVANCY SCORE 2.61

    DB:2.61:Gui Help... c8


    I'm working on a GUI and I'm wondering if it is posible to create JFrames in seperate classes then have a main UserInterface class that will use these JFrame classes. I guess my question is if it is possible to nest JFrames within JFrames. Thanks for you help.

    DB:2.61:Gui Help... c8

    So I would create UserInterface with an extends JFrame and ButtonPanel would extend JInternalFrame?

  • RELEVANCY SCORE 2.61

    DB:2.61:Multiple Custom Pipeline Components In The Same Assembly 31


    I know there are a lot of questions out there regarding this issue, but none of the resolutions seem to apply to me.
    I have a C# Project that creates an Assembly. Within that assembly I have 3 classes. Each class is intended to be a different custom pipeline component in BizTalk.
    When I compile the code and use the Object Viewer, I can see all three classes, with all their methods, and so on. When I copy the dll to the Pipeline Components folder and try to add it to the Toolbar in VS 2010, I can only see ONE of the three components
    listed.
    All three components are intended for the ComponentCategory
    CATID_Any.
    All three have Explicit interface implementations for IBaseComponent, IComponentUI, IComponent, IPersistPropertyBag
    All three have seperate GUID's, seperate class names, and seperate source code files.
    There are no components of the same name in the GAC. There are only 2 copies of the dll anywhere on the hard drive, one in the development folder...one
    in the Pipeline Components folder.
    I don't understand why only 1 component shows up.

    DB:2.61:Multiple Custom Pipeline Components In The Same Assembly 31

    TorbenChrona offered a tidbit of information about the category of component in the assembly. I suspect some of what he said applies here. I think my fist attempt had 3 components of the CATID_Any component type. Only 1 of those would show up.
    I messed around and changed one of the components to another type, suffered through some caching issues, changed types again and eventually got it to work.
    The point of this is, of the three components in the assembly, two are the same type and one is different, and they ALL show up OK.
    Best I can do for now.
    Dean

  • RELEVANCY SCORE 2.60

    DB:2.60:Oldschool Msdos Command Prompt Question 1s


    In general, is there a way so I can configure command prompt to compile files into a different directory than the one the file is in?For instance, say Inside the folder C:\JavaPrograms\Example I have example.java and I would like to place the compiled example.class into the bin directory.Instead of having to manually drag the .class files to and from the folder C:\JavaPrograms\Example\bin so I can run 'java example' (when command prompt is currently in C:\JavaPrograms\Example), is there a way to set command prompt to compile from src (or root folder) and put the compiled classes into the bin directory?Or, for that matter, can anyone suggest an alternative (non-unix) to MS command prompt that will compile and run java programs and the like just as quickly? Eclipse is quite annoying when it comes to wanting to just redirect or pipe (java example.java sample.txt for instance)Thanks!

    DB:2.60:Oldschool Msdos Command Prompt Question 1s

    You can just write a simple script (bat or cmd) to generate the output to your desire directories.
     

  • RELEVANCY SCORE 2.60

    DB:2.60:Jaxb Complier Code When Mutilple Schemas Import A Common Schema a1


    Folks ,

    I have 3 schemas a.xsd , b.xsd, common.xsd

    common.xsd is a common schema with some type definitions and common rules which will be used by multiple schemas . We also have java utilitity classes written to implement these rules (business) .

    Now i have a.xsd and b.xsd which individually import common.xsd

    When i run xjc for a.xsd , i see creation of classes for elements in common.xsd. i run program that uses a.xsd and it works

    now i compile b.xsd under same java package (there are no clashes between a.xsd and b.xsd) . I notice that it overwrites the classes for elements in common.xsd. Now programs designed for a.xsd stop working as it tries to link common elements to b.xsd namespace.

    if i put classes for a.xsd and b.xsd under 2 different java package then i have two copies for same class corrosponding to common.xsd and my Utiility classes (business logic implementers) dont know which one to use?

    Can i have java code that just references classes in common and not bind it to a.xsd or b.xsd

    Please help. i am stuck

    Thanks
    Madhukar

    DB:2.60:Jaxb Complier Code When Mutilple Schemas Import A Common Schema a1

    Folks ,

    I have 3 schemas a.xsd , b.xsd, common.xsd

    common.xsd is a common schema with some type definitions and common rules which will be used by multiple schemas . We also have java utilitity classes written to implement these rules (business) .

    Now i have a.xsd and b.xsd which individually import common.xsd

    When i run xjc for a.xsd , i see creation of classes for elements in common.xsd. i run program that uses a.xsd and it works

    now i compile b.xsd under same java package (there are no clashes between a.xsd and b.xsd) . I notice that it overwrites the classes for elements in common.xsd. Now programs designed for a.xsd stop working as it tries to link common elements to b.xsd namespace.

    if i put classes for a.xsd and b.xsd under 2 different java package then i have two copies for same class corrosponding to common.xsd and my Utiility classes (business logic implementers) dont know which one to use?

    Can i have java code that just references classes in common and not bind it to a.xsd or b.xsd

    Please help. i am stuck

    Thanks
    Madhukar

  • RELEVANCY SCORE 2.60

    DB:2.60:Using Webutin On 6i And 10g z7


    I have a 1 set of programs that were developed in 6i and migrated over to 10G. I would like to use Webutil in my programs, but don't want to have 2 seperate versions (1 for 6i and 1 for 10G). Is this possible? I need the Webutil PLL and Object group in the form before I can compile but they are different in 6ii and 10G

    DB:2.60:Using Webutin On 6i And 10g z7

    My goal is to have 1 source program that compiles under 6i and 10G. We have customers running both versions and our process is to develop under 6i and migrate to 10G. As I said, it doesn't need to work in 6i (only 10G). It would be a nightmare to keep making changes in 2 versions. Thoughts?

  • RELEVANCY SCORE 2.60

    DB:2.60:Need Com.Bea.Xquery Classes To Make Source Compile jf



    Hi,

    I'm trying to compile the source I downloaded, but several classes are missing,
    including

    com.bea.xquery.exceptions.XQRLException
    com.bea.xquery.exceptions.XQRLSystemException
    com.bea.xquery.types.XQueryType

    Does anyone know of a jar that might have these?

    Thanks in advance,
    Carl

    DB:2.60:Need Com.Bea.Xquery Classes To Make Source Compile jf


    I am surprised youare getting a compile time error. Are you running the ant default
    task from the v1 directory?

    The classes you mention should be in xqrl.jar which you will find in:

    weblogic home/weblogic81/server/lib

    Note that the Apache XMLBeans code by itself does not support XQuery since the
    XQuery implementation is BEA specific. You need to have a weblogic server installation
    and appropriate license to use. If you have xqrl.jar on your class path XMLBeans
    it will pick it up and allow the use of XQuery.

    Hope that helps,
    rem

    "carl elkin" carl_elkin@vrtx.com wrote:

    Hi,

    I'm trying to compile the source I downloaded, but several classes
    are missing,
    including

    com.bea.xquery.exceptions.XQRLException
    com.bea.xquery.exceptions.XQRLSystemException
    com.bea.xquery.types.XQueryType

    Does anyone know of a jar that might have these?

    Thanks in advance,
    Carl

  • RELEVANCY SCORE 2.60

    DB:2.60:As3 Compile-Time Error k8


    I am having problems getting this to work, when i run the
    program I get the following compile-time error;

    1046: Type was not found or was not a compile-time constant:
    MouseEvent.

    I have 2 classes, the main class and the AIRApplicationWindow
    class that is imported.

    All help / advice welcome.

    my code is as follows;

    DB:2.60:As3 Compile-Time Error k8

    I am having problems getting this to work, when i run the
    program I get the following compile-time error;

    1046: Type was not found or was not a compile-time constant:
    MouseEvent.

    I have 2 classes, the main class and the AIRApplicationWindow
    class that is imported.

    All help / advice welcome.

    my code is as follows;

  • RELEVANCY SCORE 2.60

    DB:2.60:Re: Using Import zk


    the problem i have is when i compile it wont recognize any of my classes when i try to creat objects including boolean, AbstractQueue and Monitor.

    so i tried putting all my classes into the same file but then again the same problem with in addition saying that the public classes should be in different files

  • RELEVANCY SCORE 2.60

    DB:2.60:How To Compile &Amp; Run Using Command Prompt f9


    Hi all,

    I have a java application consisting of 3 packages a jar file in the following hierarchy:
    -Project
    -classes
    -src
    -package1
    -package2
    -package3
    -file.jar

    The main class exists in package2 and uses classes within file.jar
    I want the steps to compile and execute the project using command prompt in windows such that the generated classes will be saved in the classes directory
    Can anyone help?

    Thanx in advance

    DB:2.60:How To Compile &Amp; Run Using Command Prompt f9

    Thanx it helped

    But in this case the source code could not be accessed, the error is : can not read src\*.java
    I think the reason is that source code files are not listed directly in src directory
    but they are organized within packages ( package1 + package2 + package3)
    What do you think?? Any specific case for compiling packages??

  • RELEVANCY SCORE 2.59

    DB:2.59:Re: Design Patterns x8


    jverd wrote:
    I probably wouldn't have a separate class for each department or salary. Those make more sense as attributes of the object. You might have different classes for different kinds of employees, for instance with different rules for how they get paid, like salary vs. hourly vs. commission.

    However, having said that, it may be that your instructor wants you to use different classes the way you describe. If so, I consider it a poorly taught lesson, but you'll probably just have to do what he expects for the grade.What disadvantages you think in this approach?
    Also, this method will have large number of line of code for calulations (which have nothing in common for any deptarments, all depts will have seperate method of calcs)..
    So, isnt it better to keep it seperate as and when new depts are added, the code is kept clean and maintainable and easier to add \ modify..

    DB:2.59:Re: Design Patterns x8

    I know the posting is several days old, but here is some ideas for future simliliar projects:

    I suggest you have a 'Departments' class that has a collection of Department objects (another class). Then, each Department object as a collection of employee objects (another class). Each employee class will have a variable that holds his baseSalary value. Each department will hold a salaryAdjustment value. Provide a get/set function in the employee class to set the baseSalary, and a get/set function in each department to get/set the departmentSalaryAdjustment value. Lastly, for each employee, have a getActualSalary() function that combines his baseSalary with the that departmentSalaryAdjustment value using some complex formula. As far as using a design pattern, I don't have enough information about what the teacher expects.

  • RELEVANCY SCORE 2.59

    DB:2.59:Xml Documentation ck


    I have just finished a project in beta 2005 of VS. I have generated the XML Documentation file, which is obviously not very readable. I have tried using NDoc to compile it, but this does not cope well with generics or inface .NET v2.x. Are there any programs that will compile this into a nice format? Cheers, Chris

    DB:2.59:Xml Documentation ck

    I heard very useful information that Microsoft will provide alternative solution. Please look at following URL for more information:
    http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=2d65db5c-7bf5-43f3-8496-083aa966c411

  • RELEVANCY SCORE 2.59

    DB:2.59:Re: Correct Way To Compile Packages fm


    The package has to be in your classpath, not the classes. So if your class's name is "myPackage/myClass", you will have put in into a directory named myPackage. Make the current directory the parent of that directory, then type

    javac myPackage/myClass.java

    DB:2.59:Re: Correct Way To Compile Packages fm

    Thanks atmguy. I now understand how the classpath works and how the jvm et.al. look for classes using the fully qualified class name. Ive never seen this mentioned in any of my books! Unfourately i dont have anuy dukes left I would love to awared all the guys that replied. Thanks again.

  • RELEVANCY SCORE 2.59

    DB:2.59:Compiler On The Ipaq? a8


    As far as i can see, you can only compile programs on the desktop and transfer to the device to run and test, but has anyone tried using the com.sun.tools.javac.Main (or something like that) to compile programs right on the devices? If this is possible, is there any restrictions?

    Also, if I include the swing classes in the classpath, will I be able to use swing components?

    DB:2.59:Compiler On The Ipaq? a8

    yes, I know the command line, but there are problems in setting the classpath in the registry, as it only allows a very short string, otherwise it will cut up the end. Also, this may be a newbie question, when setting classpath of a number of jar files, do i need to specify the name? or just the directory?

    There are so many problems and confusions in developing on the ppc (such as the title bar of the ppc covering the top of the application all the time). I am interested to develop an IDE with visual component editor, but need to evaluate more.

    Also, has anyone sucessfully use swing in applications?

  • RELEVANCY SCORE 2.59

    DB:2.59:External Jar - Package Not Found On Javafx-Code (Java-Code Compiles) 1d


    I have a Javafx project that uses some Java Classes, those Java Classes are using external libraries (org.jdom.Element etc..)
    Hence I have added some external jar files in the "Java Build Path", now my Java Classes compile perfectly but the JavaFX Classes won't compile and I get an Error: org.jdom package not found
    although there is not reference in my JavaFX classes to this org.jdom package !!?

    I am using Eclipse, javaFX1.2, jdk 1.6+

    Any help ?

    DB:2.59:External Jar - Package Not Found On Javafx-Code (Java-Code Compiles) 1d

    Hi,
    i have same issue.

    I'm developing with SpringSource Tool Suite (eclipse with more plugins for Spring and grails ) JavaFx 1.2 and Java6

    when i run the FX Application from the IDE i have the error not class found.

    I have all jars needed in the classpath of project.

    Any tip why is not working?

    EDIT:
    Solved, the jars needed have to stay in the project and not in external folders, at last this worked for me :).
    Probably a problem about how the IDE is using classloader for FX applcation.

    Edited by: Toriton on May 11, 2010 12:51 AM

  • RELEVANCY SCORE 2.58

    DB:2.58:Thread: Java Program Using Netware kf


    Hi

    I am using netware 6.5 SP5. I need a solution for JAVA programs to work on netware 6.5 SP5. My client already have netware 5 they are using rpl boot method i.e with Netware 5 as a server diskless clients(VGA,PS2,LAN etc). or thin clients.

    They are using DOS prompt at thinclient they are able to compile run Java programs in DOS mode. I am unable to install java on netware sice netware6.5 already has Java 1.4 inbuilt.

    How to execute JAVA programs in NETWARE in DOS prompt?

    Do i have to install seperate java in netware? which will work in dos?

    Also i am unable to boot in DOS mode using restart server command in console.

    Please provide your suggestion to compile execute Java programs in Netware DOS Mode....

    DB:2.58:Thread: Java Program Using Netware kf

    Thanks for your response

    its working now.

    I have installed the latest java 1.6 on windows machine and copied the application directory to net ware SYS volume.

    From client machine accessed the mount point of java 1.6 and tested using dos.

    its working now

    Thanks again






    Originally Posted by AndersG


    Nacetech,

    I am Murugesan from same company,let me give some more clarification

    here.

    Requirement is very simple,we have Java 1.4 in our netware 6.5 sp5.but

    dont know how to check it out from client side.either directly from

    windows novell client or through diskless client.Since we dont have the

    experience on netware , to be frank looking for the exact

    procedure/guide for checking java from client side.

    Can you elaborate? Check it out? What version did you have on the old

    server? I assume you had it installed in a directory, where the students

    had access to it?

    - Anders Gustafsson (Sysop)

    The Aaland Islands (N60 E20)

    Novell has a new enhancement request system,

    or what is now known as the requirement portal.

    If customers would like to give input in the upcoming

    releases of Novell products then they should go to

    http://www.novell.com/rms

  • RELEVANCY SCORE 2.58

    DB:2.58:Eclipse: How To Have Project Point To Classes In Another Folder? c7


    Hi,

    I have a folder that has some classes that I need for the project to compile. How can I tell Eclipse to look in that folder to find the classes/packages it needs?

    Thanks,

    DB:2.58:Eclipse: How To Have Project Point To Classes In Another Folder? c7

    hi,naddad,for my test ,it work all right .
    u can simply add the class fold as i mentioned.
    project property-liberaries-add class folder

  • RELEVANCY SCORE 2.58

    DB:2.58:Java Programming 8f


    hi all,

    i have java file with name emptyClass.java, and it contains 3 empty classes, emptyClass, emptyClass1,emptyClass2. when i compile the file, it generates three seperate class files emptyClass.class,emptyClass1.class and emtpyClass2.class. can anybody please tell me the reason? why does it compile to three different class files?

    i dont have main anywhere in the file and no public classes.

    and why should we have only one public class?

    thanks in advance.

    DB:2.58:Java Programming 8f

    Because that is how the compiler works. It will generate a .class file for each class you have. Also, when some other piece of code attempts to create an object of one of your classes, then it needs to be able to find the correct .class file.

  • RELEVANCY SCORE 2.58

    DB:2.58:Model Classes k3


    hi guys i am new to mvvm , actually i have many service methods which can be used in multiple views through their corresponding viewmodels, now my problem is that i want to use the proxy classes generated through WCF as my mode classes but how do i
    access them in my viewmodel because i have a seperate service layer project which is handling all service calls ,now in order to get
    stub of my model(proxy) clases if i add service reference so will it be fine? or is there any best help .
    regards.

    DB:2.58:Model Classes k3

    No it's fine, but if your services are in a separate project you will need a cross domain policy on the services site.
    Network Security Access Restrictions in Silverlight

  • RELEVANCY SCORE 2.58

    DB:2.58:Compiling Servlet Problem That Uses A Javabean cx


    I have a servlet that will get data from a JavaBean which is created before in a jsp file. While I trying to compile the servlet I am getting this message:

    --------------------Configuration: JDK version 1.3 Default--------------------
    Command : "C:\jdk1.3\bin\javac.exe" -d "C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes" C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes\MyServlet.java
    Directory : C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes
    C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes\TasitKayitGirisi.java:19: cannot resolve symbol
    symbol : class SimpleBean
    location: class MyPackage.SimpleBean
    SimpleBean simpleBean = (SimpleBean) session.getAttribute
    ^
    ("simpleBean");

    C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\classes\MyServlet.java:19: cannot resolve symbol
    symbol : class SimpleBean
    location: class MyPackage.SimpleBean
    SimpleBean simpleBean= (SimpleBean) session.getAttribute("simpleBean");
    ^
    2 errors

    Process completed.

    Where is the problem. SimpleBean is successfully being initializing in my jsp file. But I couldn't compile my servlet that will get data from that bean. Both my servlet and bean are in the same package. I am using JCreator to compile servlets. I think the problem is the compile string that JCreator uses. Can you help me. Thx in advance.

    DB:2.58:Compiling Servlet Problem That Uses A Javabean cx

    Hi,
    The problem is it is not finding the Bean. Put it in the classpath.
    The simplest way is put the class in /WEB-INF/classes/MyPackage folder.

  • RELEVANCY SCORE 2.58

    DB:2.58:Re: Compiling With Classes In Seperate Directories 1z


    So from what i understand. I should compile it from
    the source directory using something like this:

    javac -cp ../classes/mainLib -d ../classes *.javaAlmost; the top level classpath is located at ../classes; all .class files can be
    found in there or in subdirectories (reflecting the package names) thereof.

    You see i want one of my classes to go here: ./classesThat should be a class without a package definition then, i.e. the default package.

    And the rest to end up here: ./classes/mainLibOk, they should all have a 'package mainLib;' definition at the top.

    I want the compiler to do this automatically.Am i right in thinking this is to do with package.
    So if i put this in the file i want to end up on its own:

    package classes;Nope, the ../classes directory was the toplevel directory remember? All sub-
    directories under that reflect the package names.

    and then:
    package classes.mainLib; in all the other files it shoudl work. But do i need to
    use any import statements on this?See above: the ../classes directory is the base where all your .class files can be
    found. If a class belongs to the default package, it can be found directly in this
    directory; any .class file in a package 'X' can be found in ../classes/X.

    Just to summarize:

    if you don't put a package definition in your source, the .class file should end up
    in the ../classes directory. If you put a 'package x;' definition in your source, it
    should end up in the ../classes/x directory. Your (-cp) classpath string should
    just point to the ../classes directory, i.e. the base where all your .class files can
    be found.

    Thanks a lot for your help.You're welcome and,

    kind regards,

    Jos

    DB:2.58:Re: Compiling With Classes In Seperate Directories 1z

    Thats right.

    But i thought that the others had package mainLib; so they would go intot he mainLib directory. the cars file does not have a package line so that will end up in the / of the classes directory.

    Does this mean to get it to go there i'll have to put package classes; in cars and then:

    package classes.mainLib; in the other files or what?

  • RELEVANCY SCORE 2.57

    DB:2.57:Anonymous Package 33


    Hi all,

    I have a problem with some classes that are in no package. These classes are not from me, but JNI classes from www.kithara.com . I don't like anonymous-package-classes but I don't expect them to change this for me. The problem is, that I cannot access these classes from within a package. One solution is to put these anonymous-packaged classes in the same folder like my classes (without package-statement). Then I can compile it, but still get JNI-errors. Is there some way I can import these classes? In their examples (which stupidly are in packages) they simply import the classes with i.e. 'import Kbase;' to import the class Kbase, which isn't in any package. But that doesn't compile (with J2SDK 1.4)

    Any suggestions?

    Roman

  • RELEVANCY SCORE 2.57

    DB:2.57:Typing Inherited Classes Into An Array Of Base Classes, C# zf



    Have you checked whether ScriptableObject.CreateInstance(XXX) ever returns an object?


    I would imagine that it isn't correctly constructing the instance, otherwise your code looks ok.


    You'd probably be better off doing ScriptableObject.CreateInstance(typeof(MP)) etc. That way you will get a compile time error if the class can't be found. Avoid using strings if there is a version that is compile time available and you know in advance what you want to create.

    DB:2.57:Typing Inherited Classes Into An Array Of Base Classes, C# zf


    Have you checked whether ScriptableObject.CreateInstance(XXX) ever returns an object?


    I would imagine that it isn't correctly constructing the instance, otherwise your code looks ok.


    You'd probably be better off doing ScriptableObject.CreateInstance(typeof(MP)) etc. That way you will get a compile time error if the class can't be found. Avoid using strings if there is a version that is compile time available and you know in advance what you want to create.

  • RELEVANCY SCORE 2.57

    DB:2.57:How To Stop Java Using.... xc


    I am trying to compile a class that uses other classes. When i compile the main file it uses older versions of the other classes that have since been deleted or changed. Why is this?

    DB:2.57:How To Stop Java Using.... xc

    if i want ot just use one folder that i can save and run my files from say C:\Test, how would i specify that?For simplicity I'll assume that your classes have no package names, the source is in C:\Test and your main() method is in a class called Main. Then you can do
    C:\Test javac -classpath . *.java
    C:\Test java -classpath . Main

  • RELEVANCY SCORE 2.57

    DB:2.57:Compiling Java Classes Into Dll zz


    Hi,
    Just trying to find out is there anyway I can compile the java classes into dll?

    If I am to use JNI and C++, will the dll compiled be able to work well in a platform that does not have JVM?

    Thank you.

    DB:2.57:Compiling Java Classes Into Dll zz

    Hi,
    Just trying to find out is there anyway I can
    an compile the java classes into dll?No, but you can start the jvm and run your main class from a dll using jni. And, if you do that, you'll of course need a JVM on the client that'll be running your code.

  • RELEVANCY SCORE 2.57

    DB:2.57:Package Problem f1


    I have created a package called "com.test.auth" which I have put into a .jar file called "test_auth.jar" I have then placed this jar file in JAVA_HOME/jre/lib/ext/ so that other classes can access it. The problem is it allows me to import the package and compile it but when I try to run my class from a seperate directory I get a:

    NoClassDefFoundError: com/test/auth/

    I don't know why it allows me to import the package but throws an error at runtime, any ideas?

    DB:2.57:Package Problem f1

    Hmmm...You're right I added it to my classpath and it worked, I don't exactly know why???

    Thanks for the help, I appreciate it.

  • RELEVANCY SCORE 2.57

    DB:2.57:Can't Build After Installing Patch f3


    We just installed SOA Suite 10.1.3.4 Patchset #7272722 and SOA Suite 10.1.3.4 MLR6 #8279781 on the server we use to compile and build the BPEL suitcase jars. Now, none of the BPEL processes will compile using ANT and the build.xml provided. The message I get from the initial simple BPEL process is:


    BUILD FAILED

    /home/oracle/cruisecontrol-bin-2.8.2/projects/bpel_woo_2.0/bpel/GRC_UTIL/src/UTIL_GetWooConfiguration/build.xml:76: A problem occured while connecting to server "localhost" using port "7777": bpel_UTIL_GetWooConfiguration_1.0.jar failed to deploy. Exception message is: ORABPEL-05215

    Error while loading process.

    The process domain encountered the following errors while loading the process "UTIL_GetWooConfiguration" (revision "1.0"): Failed to compile classes.

    Failed to compile the generated BPEL classes for "UTIL_GetWooConfiguration".

    If you have installed a patch to the server, please check that the bpelcClasspath domain property includes the patch classes.Can someone suggest where to look for the problem.

    DB:2.57:Can't Build After Installing Patch f3

    Does your BPEL process embedded java code?

    If so try this.

    1. Login to BPEL Console
    2. Click on "Manage BPEL Domain", Under Configuration tab, you will find bpelcClasspath
    3. Specify user-specific classes/libraries here and click Apply
    4. Restart BPEL Server then redeploy BPEL project

    cheers
    James

  • RELEVANCY SCORE 2.57

    DB:2.57:Noclassdeffounderror j9


    Yesterday I posted the following message:
    -----------------------------------
    We are a school that is teaching Java for the first time. I have successfully installed the Java complier and JVM at home and onto a number of stand-alone workstations and have been running Java programs. I have not been able to run programs on our network workstations. The programs compile, but won't execute. I keep getting the NoClassDefFoundError. (We are using ADS Windows 2000 Advanced Server).
    I think that the problem lies with the CLASSPATH.
    The text I am using tells us to put the following two lines into the Autoexec.bat file:
    path=%path%;c:\;c:\j2sdk1.4.0_02\bin
    SET CLASSPATH=c:\j2sdk1.4.0_2\classes;

    I have checked for all spelling errors.
    I am totally clueless other than this possibility. Why will it work on my computer at home but not on the network computers. Please e-mail any help to hancteacher@juno.com
    --------------------------------------
    Amongst the responses I received included adding a . at the end of the classpath,getting rid of the classes folder etc.
    I have since been able to run programs on a stand alone workstation without any class path, but no luck on our network. I uninstalled the Java SDK and all related files and reinstalled from scratch and still no luck. Could there be some hidden path (in the network setup)that I don't know about??? (our network supervisor knows nothing about Java)
    Help - please I am at my wits end!

    DB:2.57:Noclassdeffounderror j9

    did you provide the full package name of the class you are compiling ie:

    java somepackage.SomeClass

    note that a java file of package somepackage must be put into a somepackage directory.

  • RELEVANCY SCORE 2.57

    DB:2.57:Compile Sun C Programs On Windows j3


    Is there a way to compile sun programs on windows?
    I looked around but have not found anything.
    At times I am unable to connect to my Sun server and would like to compile from
    home. Linux is not always a reliable option because there are differences sometimes in coding .
    Are there ways to emulate/compile Sun programs on a pc so they will be 100% compatible?

    Any answers are appriciated.
    Thanks.

    DB:2.57:Compile Sun C Programs On Windows j3

    You can not have binary compatibility from Solaris to Windows.

    You may be able to compile straight POSIX and ANSI compliant code without Solaris system calls on Windows. There are ways to port Windows code to Solaris, and further information about this can be found at: http://soldc.sun.com/ntmigration/articles/

    -Moazam

  • RELEVANCY SCORE 2.57

    DB:2.57:Java.Io.Serializable ma


    Hi, is java.io.serializable found in the midp specification? I am programming in Eclipse ME and am finding that one of my referenced classes in the program indirectly makes use of java.io.serializable, and it refuses to compile.
    Does this mean that I will have to make some changes to the source code of the referenced classes in order for the program to work?
    Thanks.

    Pier.

    DB:2.57:Java.Io.Serializable ma

    Yes I did that, thanks for the reply.

    Pier.

  • RELEVANCY SCORE 2.57

    DB:2.57:Certificate Programs? 18



    im thinkng of enrolling in PF certificate programs of dog obidence or veterinary assistant to enhance my resume. (i will be continuing my vet tech program as well) i noticed that some of the classes needed for these programs i have previously done through PF vet tech program, does anyone know if these credit will transfer over or if i would need to repeat them.

    DB:2.57:Certificate Programs? 18


    I don't know about the transferring classes but I did the dog obedience course and really enjoyed it. While is wasn't SUPER in depth, it covered the basics of a lot of different training techniques. I still use one of the books that came with the class as reference material when helping people choose the right breed for them.

  • RELEVANCY SCORE 2.57

    DB:2.57:Displayplayobjectcontainer Not Found When Moving Script Into Seperate Class ms



    Ls,

    I made a .fla with some inline coding and some classes.

    In the .fla actionscript I have a function to read thru the object display list.

    Its the standard one found everywhere, where it recurses thru the objectdisplaycontainers.

    This works fine.

    Then i gave the stage it own classname and moved the actionscript into a seperate .as file as well.

    Suddenly, ik get this : Line 271 1046: Type was not found or was not a compile-time constant: DisplayObjectContainer.

    the code line is : function traceDisplayList(container:DisplayObjectContainer, indentString:String = ""):void

    The imports are there.

    Am i doing something wrong on the class level?

    I didnt want to bore you with the actual scripts but if this info i have provided is not enough I will post some.

    Mac

    DB:2.57:Displayplayobjectcontainer Not Found When Moving Script Into Seperate Class ms


    Well, i feel like im imposing now since you have already corectly answerd my actual question but let me run it by you.

    (also im just winging it here. my understanding of classes is just barely enough to get things to work QED im just trying out my trial of flash cs5.5)

    So i had some simple 2d game in mind

    fruit0.fla

    containing some MC clips containing some blocks and some fruit and actionscript on frame1

    -read all the clips from the objectlist and store them in the appropriate array

    (i made a level in a mc called LEVELA1 containing all the mc's using flash as a level editor).

    - create mc with background

    - create mc with all the blocks (for a hitlayer) [parms: array and array counter]

    - create mc with all the fruit[parms: array and array counter]

    - create player mc

    - add the mc's to stage

    - loop thru touchevents to move player

    - if player hits a pixel on the hitlay do not move

    thats the .fla

    the classes for background, hitlayer and fruit are seperate .as files containing(roughly):

    - passed thru [parms: array and array counter]

    - Create myself

    - populate myself with elements from the passed array

    -----------------------------

    then i moved everything from the .fla frame one into a seprate fruit0.as class

    then kaboom

    -------------------------------------------------------------------------

    actual class code from one of the classes:

    called by :

    var bgdo:DisplayObject; (this gets filled in getlevelvars, see post 3 from top )

    var mygamebg:MovieClip = new gamebg(bgdo);

    addChildAt(mygamebg,0);

    ---------------

    package { import flash.display.MovieClip; import flash.display.DisplayObject; public class gamebg extends MovieClip {

    public function gamebg(mdo:DisplayObject) { // constructor code this.name = "myBg"; this.x = 0; this.y = 0; this.visible=true; this.populatebg(mdo); } function populatebg (mdo2:DisplayObject): void { var ts:String; ts = mdo2.toString().substring(8); ts = ts.substr(0, (ts.length -1)); //trace(ts); for (var tx:int=0; tx 8; tx++){ for (var ty:int=0; ty 5; ty++){ if (ts == "bg_grass_0") var tile:MovieClip = new bg_grass_0(); if (ts == "bg_grass_1") var tile:MovieClip = new bg_grass_1(); if (ts == "bg_grass_2") var tile:MovieClip = new bg_grass_2(); tile.x = tx * 128; tile.y = ty * 128; tile.name = tx.toString() + ty.toString(); tile.visible= true; tile.gotoAndStop( Math.round(Math.random() * 3 + 1)); addChildAt(tile,0); //trace("adding: ", tile.x, tile.y, tile, tile.name) } } }

    } }

  • RELEVANCY SCORE 2.57

    DB:2.57:About Class Path 98



    We have multiple instances of the same applications for different clients. We have
    a common set of classes that are used by all these applications. Is there a way
    we can deploy these classes only once for all the applications and be able to
    hot deploye them. We dont want to add them to each ear. We need to seperate the
    web apps the config file. If I use manifest class path I will have to create a
    jar file and deploy the file in each ear file. Putting them in system class path
    will disable hot deployment.

    Please help.

    DB:2.57:About Class Path 98


    For a common Classloader for application classes, the classes should be in the
    same ear application.

    "Joe" javajuggler@yahoo.com wrote:

    We have multiple instances of the same applications for different clients.
    We have
    a common set of classes that are used by all these applications. Is there
    a way
    we can deploy these classes only once for all the applications and be
    able to
    hot deploye them. We dont want to add them to each ear. We need to seperate
    the
    web apps the config file. If I use manifest class path I will have to
    create a
    jar file and deploy the file in each ear file. Putting them in system
    class path
    will disable hot deployment.

    Please help.

  • RELEVANCY SCORE 2.56

    DB:2.56:Re: Java Public Classes zc


    So if the reason it was added was solely because the
    compiler writer didn't want to have to compile two
    seperate files then that would be completely
    acceptable to you for the sole and only reason it
    should be in the language?I have no idea what you are even trying to say here.

    DB:2.56:Re: Java Public Classes zc

    IMO, a source file should contain exactly one top-level class, regardless of access level.

  • RELEVANCY SCORE 2.56

    DB:2.56:Visual Studio 2013 Express Visual C++ Will Not Compile! 71


    I cannot compile my C programs! When i try to build solution (since COMPILE is not under the build menu) AND i have tried the windows debugger on MULTIPLE settings, and it will not work. I cannot get it to create the .exe . The Debugger says
    that it cannot find the .exe folder, and will not run.

    DB:2.56:Visual Studio 2013 Express Visual C++ Will Not Compile! 71

    Hi,
    Yes, if you want to run VS C applications, you need Visual C redistributable packages.
    Please download Visual C Redistributable packages from here
    http://www.microsoft.com/en-in/download/details.aspx?id=40784 which are required to run VS2013 Visual C applications.
    If no help, I think that the Visual C Redistributable should be installed with VS2013. I doubt that there is anything wrong with your VS2013 installation. Or installing VS2010 and VS2013 on the same machines affected the two
    VS. Moreover you said that uninstalling VS2013 made VS2010 work well again. If possible, I suggest uninstall your VS2010 and VS2013 completely and then reinstall them. It is better if you can do it on a refresh system.
    Thanks,We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 2.56

    DB:2.56:Stupid Compiling Problems For The Simplest Of Classes fm


    Hi. I am new to java but not programming. I have just been messing around getting the feel of things so I have been writing REALLY simple classes/programs. But for some reason i get errors no matter what. No it is not my path or anything like that. He is one of the classes i tried to compile and the error message that i got. I use jGRASP 1.5.3

    public int Add(int num1, int num2)
    {
    return num1+num2;
    }

    THATS IT! AND I GET THIS ERROR MESSAGE:

    'class' or 'interface' expected
    int Add(int num1, int num2)
    ^
    1 error

    thats what it says....anyone help me out plz? thx.

    -The New Guy

    DB:2.56:Stupid Compiling Problems For The Simplest Of Classes fm

    If that's your entire code then the problem is that you haven't written a class, you just have a code fragment. This link

    http://java.sun.com/docs/books/tutorial/java/javaOO/classes.html

    shows you what's needed to write a class. Beyond that I would recommend the whole tutorial:

    http://java.sun.com/docs/books/tutorial/

    Trying to learn a language by guessing at its syntax is a very slow process.

  • RELEVANCY SCORE 2.56

    DB:2.56:Compiling Servlet In Jdk1.3.1 mj


    Hello

    I have downloaded the jdk1.3.1 and I want to compile a servlet so I have downloaded the j2sdkee1.3 as well as this has the servlet classes. When I try to compile a servlet it cant find these classes. I have also downloaded the servlet.jar file. How do I link all this up so that I can compile a servlet please?
    It's driving me nuts, surely it shouldn't be this difficult! :)

    Thanks

    DB:2.56:Compiling Servlet In Jdk1.3.1 mj

    By the way, you do not need servlet.jar. The servlet API is included in J2EE.

    Jesper

  • RELEVANCY SCORE 2.56

    DB:2.56:Compiling All Possible Java Files kp


    Hi,
    I have a project in which not all files/packages compiles but a set of packages compiles always.
    Say set of classes which might not compile as 'A' and set of classes which will always compile as 'B'
    On frequent basis i need to get update. And I am only concerned about set 'B' but when i compiles my project using ant
    compilation fails as 'A' compilation fails and because of that it doesn't go further to compile 'B'.

    So how to get eclipse like functionality to compile all possible files?

    what i have is
    ================================

    javac debug="${debug}" deprecation="${deprication}"
    optimize="${optimize}" destdir="${build.home}/WEB-INF/classes"
    listfiles="${listfiles}" target="${jdk.compliance}"
    verbose="${verbose}" srcdir="${src.home}"
    memoryMaximumSize="512M" fork="true"
    source="${src.compliance}"
    classpath refid="compile.path"/
    include name="**/*.java"/
    exclude name="HBM/**"/
    compilerarg value="-Xlint:unchecked"/

    ===================================

    I do not wish to write all the classes specifically that compiles in ant script.

    Thanks in Advance

    DB:2.56:Compiling All Possible Java Files kp

    PrashanthBabu wrote:
    Try with failonerror option in your javac.And per the OPs question what happens with that when there is a build error in the 'B' set of files?

  • RELEVANCY SCORE 2.56

    DB:2.56:Compile In 1.5 Jvm And Run In 1.4 Jvm, Work? ak


    1 - If i have a class that only uses generic and other features that are only useful for compile-time, is it possible to run compiled classes in 1.5 JVM in 1.4 JVM?

    2 - If i'm right, the JVM 1.5 features that are useful for compile-time, are removed in the classes. For instance, the generic types that we use in java classes disappear in the classes files. Is this true?

    Thanks,

    DB:2.56:Compile In 1.5 Jvm And Run In 1.4 Jvm, Work? ak

    There are postcompilers that can do what you want, sort-of. Of course you won't be able to use any of the new classes (not quite true, but true enough), but the pure language-features are accessible.

    Retroweaver is one such product, I've seen another one, that seemed to be more actively developed, but didn't remember it's name.

    I've actually used Retroweaver quite a bit and it worked pretty good.

  • RELEVANCY SCORE 2.56

    DB:2.56:Appropriate Packaging For Ejbserver And Ejbclient For Redepl ap



    I have a jar file that contains my DAO objects, along with my EJB classes, including all of the interfaces -- let's call this DaoEJb.jar. That jar file is packaged with the library jar files I need into an ear file, and deploys fine.Now, I have a seperate war application that is a client of these ejb's that is deployed into the same container. It contains jsp's that access the ejb's and DAO's. It accesses the EJB's using the remote interface (with the intent of it then defaulting to the local due to Jboss optimization). I have tried putting the DaoEJb.jar file in the lib directory of my war file, and it will deploy fine, jsp's will compile. All is great, that is until I try to redeploy my war file with changes to my jsps. I get the following error: EJBException:javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract org.osn.ejb.PersistenceService org.osn.ejb.PersistenceServiceHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)Now, if I remove the DaoEJb.jar from the lib directory of the war file, it will redeploy ok (beacuse I am assuming now it defaults to the classloaded of the ear file) -- however, this only works if I precomile my jsp's. Otherwise jasper fails because it doesn't know about my DAO's and ejb's.So my question is: Given my scenairo of an ear file that contains my EJB's, and seperate war files that should be able to be redeployed, what is the best practice for pacakging up my jar's? Where should I put my DaoEJb.jar. I would prefer to not put it into the lib directory of the JBoss server so I can redeploy the EJB's when nessecary as well.Thanks!

    DB:2.56:Appropriate Packaging For Ejbserver And Ejbclient For Redepl ap


    I have a jar file that contains my DAO objects, along with my EJB classes, including all of the interfaces -- let's call this DaoEJb.jar. That jar file is packaged with the library jar files I need into an ear file, and deploys fine.Now, I have a seperate war application that is a client of these ejb's that is deployed into the same container. It contains jsp's that access the ejb's and DAO's. It accesses the EJB's using the remote interface (with the intent of it then defaulting to the local due to Jboss optimization). I have tried putting the DaoEJb.jar file in the lib directory of my war file, and it will deploy fine, jsp's will compile. All is great, that is until I try to redeploy my war file with changes to my jsps. I get the following error: EJBException:javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract org.osn.ejb.PersistenceService org.osn.ejb.PersistenceServiceHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)Now, if I remove the DaoEJb.jar from the lib directory of the war file, it will redeploy ok (beacuse I am assuming now it defaults to the classloaded of the ear file) -- however, this only works if I precomile my jsp's. Otherwise jasper fails because it doesn't know about my DAO's and ejb's.So my question is: Given my scenairo of an ear file that contains my EJB's, and seperate war files that should be able to be redeployed, what is the best practice for pacakging up my jar's? Where should I put my DaoEJb.jar. I would prefer to not put it into the lib directory of the JBoss server so I can redeploy the EJB's when nessecary as well.Thanks!

  • RELEVANCY SCORE 2.56

    DB:2.56:Javac Options 3x


    Hi,

    I have a number of packages of java files. Some of them have compile time errors some of them dont but they are all mixed in together. When I try to compile them the java compiler will not generate any class files because of the classes that have compilier errors. I'am wondering is there any options to tell the compilier to generate class files for the java files it can and just give the errors for the ones it cant.

    I am using ant to compile the files. The reason i need to do the above is to generate a report from the packages and to do this i need the class files for the classes that are compiling ok.

    thanks in advance
    john

    DB:2.56:Javac Options 3x

    It will compile anything that doesn't depend on broken classes.
    If class A depends on class B and B fails to compile A cannot be compiled because of the errors in B, there's no way around that.

  • RELEVANCY SCORE 2.56

    DB:2.56:December Ctp Of Vsts Has Removed All Support For Artifact Linking???? ss


    I noticed that our code will not compile with the new December CTP of VSTS b/c classes like Microsoft.TeamFoundation.Artifact have been removed. Is the plan not to include linking of custom artifacts?

    Thanks,
    Nick

    DB:2.56:December Ctp Of Vsts Has Removed All Support For Artifact Linking???? ss

    I cannot find Microsoft.TeamFoundation.Artifact in the Microsoft.TeamFoundation namespace

  • RELEVANCY SCORE 2.55

    DB:2.55:Compile Java Code 7j


    Hi

    I have just started working on Java. Can anyone let me know where can i download the java complier (javac) so that i can compile and run my programs.

    Thanks

    DB:2.55:Compile Java Code 7j

    http://java.sun.com/docs/books/tutorial/getStarted/

  • RELEVANCY SCORE 2.55

    DB:2.55:Stupid Compiling Problems For The Simplest Of Classes as


    Hi. I am new to java but not programming. I have just been messing around getting the feel of things so I have been writing REALLY simple classes/programs. But for some reason i get errors no matter what. No it is not my path or anything like that. He is one of the classes i tried to compile and the error message that i got. I use jGRASP 1.5.3

    public int Add(int num1, int num2)
    {
    return num1+num2;
    }

    THATS IT! AND I GET THIS ERROR MESSAGE:

    'class' or 'interface' expected
    int Add(int num1, int num2)
    ^
    1 error

    thats what it says....anyone help me out plz? thx.

    -The New Guy

    DB:2.55:Stupid Compiling Problems For The Simplest Of Classes as

    Wrong doofus. Clearly the noooooobeeeee has no CLASS defined. Nitwit nooooobeeeee needs:
    public class MyNooooobeeeeeClass {
    // put your stupid methods, like Add, here!
    }

  • RELEVANCY SCORE 2.55

    DB:2.55:Swing Classes Not Found 3z



    I have installed RedHat Linux 7.1 on my laptop at home.

    I am trying to run a few small java programs.

    There is no problem to compile and run pgms with AWT classes. However, whenever I try to run pgms requiring swing stuff, I get an compilation error like --

    cannnot find JTextArea or JLabel class

    something like that..

    Anybody has had similar experience? Is that I did not point path correctly to my linux jdk1.3 directory? What is the right command on Linux for setting path?
    (I know in windows, it is like 'set path=C:/jdk1.3/bin')

    Thanks in advance!

    DB:2.55:Swing Classes Not Found 3z

    That is it! Indeed, I was using an old version of jdk!

    Now I have created in /bin a symbolic link of javac and java to point to my jdk1.3 on linux. It is working now!!!

    Thanks alll of you for your help!

  • RELEVANCY SCORE 2.55

    DB:2.55:Where Do I Put The Class Files From 3rd Parties ...? f3


    Hi

    Very new to Java, but very experienced in software dev.

    My confusion is this, when using 3rd party classes, the only way in which I can get my code to compile/run is by putting those classes (as .jar or .zip) into my C:\WINDOWS\Sun\Java\lib\ext directory.

    However, I have a feeling inside that this isn't going to do me any favours when I distribute my code to users.

    I've got my classes laid out in directories such as:

    /projectname/source/package_path/*.java
    and
    /projectname/classes/package_path/*.class

    but where would I put a package from com.domain.classname say?

    And can I keep the 3rd party classes in their .jar, or do I have to compile my own jar with everything in it (including 3rd party classes etc) when I distribute to users?

    Any suggestions or pointers would be appreciated. I know I can compile with javac -classpath= but that doesn't really help me understand where the best place will be to put everything.

    Many thanks in advance.
    Howard

    DB:2.55:Where Do I Put The Class Files From 3rd Parties ...? f3

    Ok, many thanks for the help, all working hunky-dory
    now! Whoo hoo (now there's no stopping me ...)

    once you've got the hang of it, you might want tolook
    at apache ant for building more complex projects.an
    important tool for you to knowAh ... ok, so maybe I was premature in my
    celebrations :-) (more tools to get to grips with!)this particular tool is very much worth investing some time in. it doesn't take much effort to get the basics, and the return on your investment is massive. a tip for using it, and indeed any automation tools: don't automate anything you couldn't actually do yourself. when it goes wrong, you won't have a clue how to fix it!

  • RELEVANCY SCORE 2.55

    DB:2.55:Stringtokenizer ap


    Hi,

    I'm using String Tokenizer to seperate a line.
    I want to create an instance with these seperate elements.
    My problem is that I have to convert these elements in different types like Double, Date and some others that I created as classes.

    If somebody can teach me how to do it, it's gonna be very useful!

    Thanks!

    DB:2.55:Stringtokenizer ap

    Thanks again!

    This is gonna be very useful!

    I'm gonna try both....

    For the Adress ortograph, don't worry, I'm not gonna have do do a lot of modifications

    Thank you for the help!!

    Marie

  • RELEVANCY SCORE 2.55

    DB:2.55:Java Package a7


    Hi All!
    When i started learning java program, during compilation and running, i put all source files and class files in the same directory.. After that when i was more familar with java development, I made separate directory for source files and class files such as
    D:\My Project\source\.java
    D:\My Project\classes
    During compilation and running, i used following command in command prompt.
    D:\cd D:\My Project\source ---Enter
    D:\My Project\source -d .\classes D:\..java --Enter
    To run the program i use the following command
    D:\My Project\classes --Enter
    D:\My Project\classesjava mini(say)
    mini
    But if the source code has some package name say (package my pack) at the top of the codes, i get the the following error. - d invalid flag
    It appears to me that in many programs since my source files and class files are not in the same directory, i find inavalid -d flag error during compilation specially for the codes when the package name is at the top.
    Please let me know:

    1Should i make separate directory for my source files and class files in all my program just to get rid off -d invalid flag error?
    2.If my source files have two classes -- one class just at the beginning and other is under main method, should i make two class directory as follows:
    D:\My Project\classes1
    D:\My Project\classes2
    If classes2 is defined under main method, should i run the program using following command
    cd D:\My Project\classes2 java mini(say)
    3. I would like to form one main directory which contains all my project. Will the following command in command promt will help?
    D:\mkdir PROJECT\My Project\MyProject1\My Project2\--------
    D::\mkdir PROJECT\CLASSES\classes1\classes2\---
    Also, to compile all .java files in one directory, should the following command in command prompt is suitable?
    D:\mkdir source\.java
    Please reply.
    stare

    DB:2.55:Java Package a7

    Hi All!
    When i started learning java program, during compilation and running, i put all source files and class files in the same directory.. After that when i was more familar with java development, I made separate directory for source files and class files such as
    D:\My Project\source\.java
    D:\My Project\classes
    During compilation and running, i used following command in command prompt.
    D:\cd D:\My Project\source ---Enter
    D:\My Project\source -d .\classes D:\..java --Enter
    To run the program i use the following command
    D:\My Project\classes --Enter
    D:\My Project\classesjava mini(say)
    mini
    But if the source code has some package name say (package my pack) at the top of the codes, i get the the following error. - d invalid flag
    It appears to me that in many programs since my source files and class files are not in the same directory, i find inavalid -d flag error during compilation specially for the codes when the package name is at the top.
    Please let me know:

    1Should i make separate directory for my source files and class files in all my program just to get rid off -d invalid flag error?
    2.If my source files have two classes -- one class just at the beginning and other is under main method, should i make two class directory as follows:
    D:\My Project\classes1
    D:\My Project\classes2
    If classes2 is defined under main method, should i run the program using following command
    cd D:\My Project\classes2 java mini(say)
    3. I would like to form one main directory which contains all my project. Will the following command in command promt will help?
    D:\mkdir PROJECT\My Project\MyProject1\My Project2\--------
    D::\mkdir PROJECT\CLASSES\classes1\classes2\---
    Also, to compile all .java files in one directory, should the following command in command prompt is suitable?
    D:\mkdir source\.java
    Please reply.
    stare

  • RELEVANCY SCORE 2.55

    DB:2.55:Combining Two Different Programs On One Plate Form sp


    I have two different programs(calaender and addressbook)in two different classes (Each one has a "main").How do i bring them together on a single plateform so that clicking one button will run one of them and clicking other will run the other.
    Could some body please help me?
    Thanks.

    DB:2.55:Combining Two Different Programs On One Plate Form sp

    Hi,

    There is a loadClass method in Class. You can use this with reflection.

    You can also write a customised ClassLoader

  • RELEVANCY SCORE 2.55

    DB:2.55:Problems In Running Sqlj Programs! 11


    Dear SQLJ Support,

    I am not able to run SQLJ programs. I am able to compile a .sqlj file.

    I tried to compile the demo programs, for example, TestInstallCreateTable.java. I get
    "Class oracle.sqlj.runtime.Oracle not found in import" error.
    "Class sqlj.runtime.ref.DefaultContext not found in import" error.

    When I try to run the other Demo programs also, I am getting errors at places where I import classes from translator.zip. Is there a problem with the JDBC Drivers?

    I have set the classpath set to

    ORACLE_HOME/sqlj/lib/translator.zip, where the classes are found
    ORACLE_HOME/jdbc/lib/classes111.zip, where the JDBC classes are found
    JAVA_HOME/lib/classes.zip, where the core java classes are found

    I am using Oracle 8.1.6, SQLJ 8.1.6, JDK 1.1.8 on Windows NT 4.0.

    Am I missing something else? Kindly advice. Thanks in advance.

    Regards,
    Radha.

    DB:2.55:Problems In Running Sqlj Programs! 11

    Dear SQLJ Support,

    I am not able to run SQLJ programs. I am able to compile a .sqlj file.

    I tried to compile the demo programs, for example, TestInstallCreateTable.java. I get
    "Class oracle.sqlj.runtime.Oracle not found in import" error.
    "Class sqlj.runtime.ref.DefaultContext not found in import" error.

    When I try to run the other Demo programs also, I am getting errors at places where I import classes from translator.zip. Is there a problem with the JDBC Drivers?

    I have set the classpath set to

    ORACLE_HOME/sqlj/lib/translator.zip, where the classes are found
    ORACLE_HOME/jdbc/lib/classes111.zip, where the JDBC classes are found
    JAVA_HOME/lib/classes.zip, where the core java classes are found

    I am using Oracle 8.1.6, SQLJ 8.1.6, JDK 1.1.8 on Windows NT 4.0.

    Am I missing something else? Kindly advice. Thanks in advance.

    Regards,
    Radha.

  • RELEVANCY SCORE 2.54

    DB:2.54:How Can I Compile And Run Other Java Classes From Within An Application? 7d


    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.

    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!

    I have tried using this command to compile:

    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");

    ...and this one to run:

    Runtime.getRuntime().exec ("c:\\programs\\java className");

    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.

    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!

    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!

    Adrian ( ...in distress!! )

    DB:2.54:How Can I Compile And Run Other Java Classes From Within An Application? 7d

    Please do not cross-post:

    http://forum.java.sun.com/thread.jsp?thread=295131forum=31message=1164808

  • RELEVANCY SCORE 2.54

    DB:2.54:Stupid Newbie Question md


    Okay, I am sure this is really basic but I'm stumped. I am working on building a class that will set up a JTable with calculated data in it. I need to extend the JTable class as well as another class that holds variable data I need for the calculation. When I try to extend both in the class defination, I get a compile error. My question is this: How do I extend two seperate classes at once? An example of what I amdoing is below...

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;

    class TableData extends MyClass extends JTable
    {

    public TableData()
    {

    // do interesting stuff here //

    }
    }

    DB:2.54:Stupid Newbie Question md

    Please use your own Thread if you have a question and please don't
    crosspost

  • RELEVANCY SCORE 2.54

    DB:2.54:Re: Classes Compile But Program Doesn't Run???? jp


    That is what I have and it still not working.

    DB:2.54:Re: Classes Compile But Program Doesn't Run???? jp

    THANKS EVERYBODY FOR YOUR HELP.
    IT WAS A "CLASSPATH" VARIABLE THAT WAS NOT SET AT ALL, AND JAVA USES IT TO EXECUTE. I SET THIS ONE AND NOW IT ALL RUNS FINE.
    THANKS AGAIN AND YOU ALL HAVE A GOOD ONE.

  • RELEVANCY SCORE 2.54

    DB:2.54:How To Compile A Package With Classess 77


    Hi,

    Can any one tell me , how to compile a package ?

    Actually, i have three classes under the package named as linklist.
    i am unable to compile the classes under this package ? its always raising errors. saying that the package does not exist.

    Can any one tell me, why it is like this ?

    thanks in advance

    DB:2.54:How To Compile A Package With Classess 77

    You may want to try the tutorial here.

    http://java.sun.com/docs/books/tutorial/java/interpack/packages.html

  • RELEVANCY SCORE 2.54

    DB:2.54:Java.Lang Symbols Not Found When Compiling Package Classes c1


    I have a set of classes that I have wrapped up in a package. The package name and
    directory structure follow the standard required for each. These classes contain many
    java.lang.Math functions and java.lang.Double calls.

    Am I correct in that the java.lang functions will be imported automatically? When I
    compile a class that is in the package, it looks for the Math.pow (for example)
    function in the package instead of java.lang. I have tried putting the following include
    at the top:

    include java.lang.*;and I still get the "cannot resolve symbol" error. Only when I use

    include java.lang.Math;
    include java.lang.Double;does it compile properly. Is this indicative of a problem with my classpath? It is
    currently set to look in whatever the current directory is, the directory with src.jar,
    and my dev directory that contains the package I am working on.

    Please advise! Thanks in advance!

    Rodman

    DB:2.54:Java.Lang Symbols Not Found When Compiling Package Classes c1

    Thanks for the quick reply! I looked in the package directory and found the Math.java and
    Double.java files. I'm not sure why they were there. Thanks again!

  • RELEVANCY SCORE 2.54

    DB:2.54:What Is Wrong With Package Statement? 3p


    Dear all,

    I have a very strange problem with my classes. In two classes, I used
    pakage saxbean;
    in the first line of the code to specify that the two classes are in the same package named saxbean. However, one class can be compiled without any problem,the other one always gave error messages:
    can't resolve symbol...

    My classes in this case are
    1. MyElement.java and 2. MySAXParserBean.java
    where 2 use 1. when I tried to compile 2, then the error messages came saying:
    can't resolve symbol MeElement
    location: saxbean.MySAXParserBean.java
    even though there is a class called MyElement.class in the same directory.
    ?????

    Any idea, anyone?

    BTW: no problems with other programs if using pakage statement. And the enviroment settings should be fine.

    I was despressed by it :(

    DB:2.54:What Is Wrong With Package Statement? 3p

    Give us your classpath and commandline... And remember: even if the other class was compiled successfully it doesn't mean that it was compiled correctly. You need to compile both classes from the parent directory, so delete the class files that you have now.

  • RELEVANCY SCORE 2.54

    DB:2.54:Tomcat4.0 Is Not Finding My Bean Classes s3


    in my application i have created a seperate directory in the webapps dir of tomcat4.0.i have put all my servlet classes and bean classes in web-inf/classes folder.but tomcat is giving me mesaage that it can't find the bean.if i put the bean classes under the classes dirof tomact4.0 it is working fine.but i want to put the bean classes in my directory under webapps.can i do that??

    DB:2.54:Tomcat4.0 Is Not Finding My Bean Classes s3

    You can make your bean and servlets part of a package. So if you do

    package webapps;

    in the beans/servlets files. You will have to have your beans/servlets in WEB-INF/classes/webapps/ then it should work.

    If you have:

    package blah1.blah2.blah3;

    classes will have to be in:

    WEB-INF/classes/blah1/blah2/blah3/

  • RELEVANCY SCORE 2.54

    DB:2.54:Problems Importing Servlet Classes z9


    When I try to compile a bean which has import statements for importing servlet classes, I get the message that the class is not found in import when I compile the code. I have all these class files and I'm not sure whether I've placed them aptly. Please give me the details about placing the servlet classes and configuring my javac to import these classes.

    Thanks!

    DB:2.54:Problems Importing Servlet Classes z9

    If you place your classes in the %JAVA_HOME%/jre/lib/ext, they will be automatically accepted by the javac and the java. But, depending on the classes you use, it would be better to include them in %application path%/WEB-INF/lib, so they will only be used by that application.

  • RELEVANCY SCORE 2.54

    DB:2.54:Compile Java Programs ak


    I have downloaded the new SDK. I want to make changes to the bat file to compile the program when I am in any directory. How do I do that
    Thanks

    DB:2.54:Compile Java Programs ak

    there is no bat file to change, you need to add the
    bin directory of your SDK to the PATH environmental
    variable.... unless the user had created a .bat file or was given a pre-constructed .bat file.... not likely, but it is a possibility. Though, had he created the original .bat file, there would be no need for his question....

  • RELEVANCY SCORE 2.54

    DB:2.54:How Do You Link 2 Classes? az


    i have a main class which is my canvas class and also have seperate classes that perform other functions. How do you
    declare the other classes in the main class so that the canvas when running goes off gets the code for the task.

  • RELEVANCY SCORE 2.54

    DB:2.54:Java Compile Error cf


    hi
    im currently running java 1.4.2 on ubuntu linux.
    i can compile and run my simple one class programs without any probs.
    recently i have tried to compile a class which uses objects defined in other classes in the same directory and it wont compile. it has problems with any objects not defined in that particular class. error message says object cannot be resolved to a type.
    any help here would be appreciated
    thanks

    Edit/Delete Message

    DB:2.54:Java Compile Error cf

    Bone up on packages, classpath and how to compile. http://www.jarticles.com/package/package_eng.html

    - Saish

  • RELEVANCY SCORE 2.54

    DB:2.54:Does Jdk 7 Make Code That Works On Jre6 p3


    In the FILE I/O documentation trail, it explains that the documentation has been updated to be consistent with the JDK 7 classes. It also has instructions on the quickest ways to update your legacy code to the new tool kit. And it even explains some way to use a method called .toPath that will allow you to "take advantage of the java.nio.file.Path functionality" using (presumably) JDK6 classes.

    So here are my questions.

    1. Does this mean that if I download and install the current snapshot of JDK 7, then the programs I compile with it willl work with anyone using JRE6?

    2. If the answer to this question is "no" then how could anyone run and debug code using the new classes?

    3. Why does JDK6' version of the the java.io.File class have the aforementioned toPath functionality (via the toPath method), if all this Path stuff is new to JDK 7? Or was all this functionality present in JDK but called something else?

    4. I am using NetBeans....do I need special javadocs files for the new file I/O classes (java.nio.file and java.nio.file.attributes)?

    DB:2.54:Does Jdk 7 Make Code That Works On Jre6 p3

    ...I inferred that......the old style commands would be deprecated,I wouldn't bet on above.

    We will know for sure only after JDK7 is released, with all the finalized official API javadocs etc. Google for "java what means deprecated" if you're interested in details

    I should not be using them in new programs, Above sounds about correct. You should not be - in sense that this won't be recommended. But you certainly will be able to use them if you want/need to. Google for "java backward compatibility" if you're interested in details

    the supporting binaries for the older classes may not exist in future versions of the JRE,Above is wrong

    and in particular, those binaries wouldn't exist in JRE7!Above is wrong

    Based on what you have said, that last statement is certainly NOT true. And most of the ones that I made after the quote are questionable.

    Is that how you see it?That is how I see it :)

  • RELEVANCY SCORE 2.54

    DB:2.54:Dreaded Classpath xf


    Hello, I am desperately needing help with the classpath. I have installed j2sdk1.4.1_01 on to my c: drive (windows 2000 advanced server).

    I then created a directory called c:\Java\Projects\"all.java files"
    I also created a directory called c:\classes\Java\Projects\"all.class files"

    The reason was to be able to compile from the cmd line and send my class files to a seperate folder.

    This worked, and compiled, actually javac created the portion of the directory under the classes folder.

    The problem is 3-fold: 1.) I cannot run my Programs. "java myProgram"
    2.) I cannot import MyInput
    3.) I am not understanding the classpath/Package/import/ relationship. somebody please help me to understand this.

    Directory structure:

    c:
    |
    |-classes
    | |
    | |-Java
    | |
    | |-Projects\.class files
    |
    |-J2sdk1.4.1_01
    |
    |-Java
    |
    |
    |-Projects\.java files

    I hope this is enough information for some good help. This problem is hindering me from learning more about Java.

    DB:2.54:Dreaded Classpath xf

    You are not alone. Sun has done a poor job with this java issue.

  • RELEVANCY SCORE 2.54

    DB:2.54:Strongly-Typed Access To A Resources (Satellite Assemblies) .Dll From Other Projects? ka


    I can't figure out if it is possible, (using VS 2005 and .Net 2.0), to get strongly-typed access (including IntelliSense at design-time) to resources stored in a seperate .dll.
    Our project has about 5 seperate executable programs. Each has it's own VS Project. Many of the resources (strings and icons) need to be shared between these Projects, and they need globalization/localization. We have an assembly consisting of a single resources.resx file, which compiles into CoName.Applications.MyAppsGroup.Resources.dll. We also have a couple of Satellite Assemblies that translate many of the resources in the Neutral Culture .dll
    I can include a reference to that .dll in my 5 .exe projects, and I can access the individual resouces using the old way - GetString and GetObject.
    With VS 2005, it is easy to define a satelllite assembly resouce file for each form and  easy to create a satelllite assembly resouce file for each project, and access the resources (from within theproject) in a strongly-typed manner using the project's Properties.Resources class.
    But (after spending 2 days on research and testing) I can't find any way to access the resources in CoName.Applications.MyAppsGroup.Resources.dll from the CoName.Applications.MyAppsGroup.App1 project in a strongly-typed manner. (CoName.Applications.MyAppsGroup.Resources.dll is referenced in the CoName.Applications.MyAppsGroup.App1 project, so it is available at design-time, and copied to the bin dirs at compile-time, making the .dll available during debugging....)
    If this is possible, could anybody throw some pointers my way? and if it is not possible, let me know so I quite worrying about it?
    BTW - looking at how VS automagically builds the Resources.designer.cs file, I can see how it creates the internal class that provides the strong-typing for each resource. I don't want to have to manually create and maintain a public class in the CoName.Applications.MyAppsGroup.Resources project to provide strong-typing. If there is a way to tell the ResGen custom tool to create publically accessable helper classes for access to the resources, that would be a fine solution... Maybe there is already a way (with appropriate class/assembly/dll naming) to get this functionality, and I'm just dense. Anyway - any and all help will be appreciated!
    Thanks!
     

    DB:2.54:Strongly-Typed Access To A Resources (Satellite Assemblies) .Dll From Other Projects? ka

    Make sure you are using the fully qualified namespace + the file or class name, not just the class / file name.Daniel K Ward