Stand alone class and the class path

Hi,
I have a simple Java project in Eclipse environment. The project has it's class path,
that contains a jar file that I need to use.
The project runs perfect in the Eclipse.
Now, I need to take the main class out of my project, to function alone in another environment.
My problem is that out of the environment, I don't know how the class should know that classpath.
I moved that jar to the same folder that the class located in, but I don't know how to tell it that the jar is there.
My goal is to run my standalone class from another java class.
I'm afraid that examples in command environment wouldn't help me.
Thanks a lot for any help !

moshi wrote:
I have a simple Java project in Eclipse environment. The project has it's class path,
that contains a jar file that I need to use.Ok, so you have a class that you have written that depends on an external library. Fair enough.
The project runs perfect in the Eclipse.
Now, I need to take the main class out of my project, to function alone in another environment.Maybe (just maybe!) defining what exactly that "other environment" is could help us help you.
My problem is that out of the environment, I don't know how the class should know that classpath.Well, obviously that depends on what that other environment is.
You must have some way to influence that other environments classpath, or you couldn't even get it to call/use your class.
I moved that jar to the same folder that the class located in, but I don't know how to tell it that the jar is there.Now you're just guessing.
My goal is to run my standalone class from another java class. That's simple enough, you probably do it all the time.
I'm afraid that examples in command environment wouldn't help me.And why exactly is that?
Do you realize that you tell us far too little about your problem for us to be able to actually help you?

Similar Messages

  • What is the difference between document class and normal class

    Hi,
    Please let me know what is the difference between document class and normal class.
    And I have no idea which class should call as document class or call as an object.
    Thanks
    -Actionscript Developer

    the document class is invoked immediately when your swf opens.  the document class must subclass the sprite or movieclip class.
    all other classes are invoked explicitly with code and need not subclass any other class.

  • Hi, i'm trying to download the Lightroom 6 stand alone version and get the following message right after a click the checkout box: "The account was registered for a different country. Please sign out and sign in using an existing account for this country.

    Hi, i'm trying to download the Lightroom 6 stand alone version and get the following message right after a click the checkout box: "The account was registered for a different country. Please sign out and sign in using an existing account for this country." I'm in Namibia and tried to change my country from Africa to USA but still the same problem. TIA

    Hi Annen,
    Please refer the following forum thread.
    Trying to purchase trial period in different email address - error message "Error in Your Order The account was registered for a different country. Please sign out and sign in using an existing account for this country. Ok"
    Regards,
    Sumit Singh

  • What is the relation between main class and inner classes

    hi
    i want to make a UML design and o want to know how to draw the relation betwwen the main public class and inner classes?
    and what is the relation?

    BaffyOfDaffyA wrote:
    Please keep in mind that if you spell better you will get better answers and if you add duke stars you will get better answers and if you mark the thread as a question you will get better answers. That will make it look like you are paying attention and that you really want an answer.
    My best answer based on your rather vague question:
    A minimal public class in a file named "Minimal.java" in the directory named "minimal":
    package minimal;
    public class Minimal {
    private int variable;
    public Minimal(int var) {
    variable = var;
    public int getVariable() {
    return variable;
    }This would be an example of adding an inner class:
    package minimal;
    public class Minimal {
    private int variable;
    public Minimal(int var) {
    variable = var;
    public int getVariable() {
    return variable;
    public class Inner {
    private int innerVariable;
    public Inner(int var) {
    innerVariable = var;
    public int getInnerVariable() {
    return innerVariable;
    }The inner class is exactly like any other inner class except if you are accessing it from anything else other than Minimal then you would have to add Minimal. right before Inner for example, where the Minimal class could use
    Inner inner = new Inner(5);other classes would have to use
    Minimal.Inner inner = new Minimal.Inner(5);
    See [Inner Class Example|http://java.sun.com/docs/books/tutorial/java/javaOO/innerclasses.html] or [Nested Classes|http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html] for more information.
    He is probably not asking what an inner class is or how to declare one in raw source code. To me he is asking how do I
    explain this relationship in a UML diagram and as UML is not and exact science and expression can vary a lot
    between UML design applications I didn't want to stab in the dark.
    @OP I would say whatever seems most logical to you and your team, write something that reads.

  • I took a photo class and the tech showed me how to take iPhoto images and export to an external hard drive. However, I do not recall how this was done. Can anyone provide me with step by step instructions? TIA!

    I took a photo class and the tech showed me how to take iPhoto images and export to an external hard drive. However, I do not recall how this was done. Can anyone provide me with step by step instructions? TIA!

    iPhoto->:File->Export…. BTW, iPhoto and OS version would help; whereas, iOS version doesn't.

  • So i dropped my iphone 4 in class and the screen is cracked. it wont turn on so i went home and connected it into my itunes and the phone just keeps beeping like every ten seconds and the phone lights up just a little. What does this all mean?

    so i dropped my iphone 4 in class and the screen is cracked. it wont turn on so i went home and connected it into my itunes and the phone just keeps beeping like every ten seconds and the phone lights up just a little. What does this all mean?

    It means you should take it to the Genius Bar. You will no doubt need to buy an out of warranty replacement.

  • Data class and Delivery class in ABAP Dictionary

    Hi all,
    I want to know the exact information about Data class and Delivery class in ABAP Dictionary
    Moderator message : Search for available information. Thread locked.
    Edited by: Vinod Kumar on Aug 3, 2011 1:35 PM

    As your name Suggests, there were exactly 21 rajapandian already who wanted exact information about  Data class and Delivery class. Fortunately some has found the information by own and some were dumped by SAP Police.
    Cheers
    Amit

  • Abstract Class and polymorphism - class diagram

    Hi,
    ]Im trying to draw a class diagram for my overall system but im not too sure how to deal with classes derived from abstract classes. I'll explain my problem using the classic shape inheritance senario...
    myClass has a member of type Shape, but when the program is running shape gets instantiated to a circle, square or triangle for example -
    Shape s = new circle();
    since they are shapes. But at no stage is the class Shape instantiated.
    I then call things like s.Area();
    On my class diagram should there be any lines going from myClass directly to circle or triangle, or should a line just be joining myClass to Shape class?
    BTW - is s.Area() polymorphism?
    Thanks,
    Conor.

    Sorry, my drawing did not display very well.
    If you have MyClass, and it has a class variable of type Shape, and the class is responsible for creating MyClass, use Composition on your UML diagram to link Shape and MyClass.
    If you have MyClass, and it has a class variable of type Shape, and the class is created elsewhere, use Aggregation on your UML diagram to link Shape and MyClass.
    If you have MyClass, and it is used in method signatures, but it is not a class variable, use Depedency on your UML diagram to link Shape and MyClass. The arrow will point to Shape.
    Shape and instances of Circle, Triangle, Square, etc. will be linked using a Generalization on your UML diagram. The arrow will always point to Shape.
    Anything that is abstract (class, method, variable, etc.) should be italicized. Concrete items (same list) should be formatted normally.
    BTW, the distinction between Composition, Aggregation and Dependency will vary from project to project or class to class. It's a gray area. Just be consistent or follow whatever guidelines have been established.
    - Saish

  • Data class and storage class

    Hi ,
    I need some info or docs on data class and stroge class of DSO /cube.
    Regards
    tapashi

    Hi Tapashi,
    Something i found about dataclass in DSO/Cube, which might be useful to you.
    Within SAP BW following data class of DDIC objects are important:
    DDIM           Dimension Tables in BW of InfoCubes
    DFACT          Facts Table in BW of InfoCubes
    DODS           ODS Tables in BW
    These have been introduced in order to improve performance while reading/writing InfoProviders. Settings of data class are maintained in "Technical Settings -> Database storage parameters" screen of TA SE11. Data class is assigned to the database tables of the InfoCube (table RSDCUBE, RSDODSO). Notice that this assignment cannot be made by any circumstances by user, only system does this while you activate InfoProvider.
    Subsequently see overview of table RSDCUBEu2019s fields with link to data class according BW versions:
    SAP BW 3.x (parameters only affect aggregates, not the cube):
    AGGRDATCLS     Data class for aggregate fact tables (only aggregates)
    AGGRSIZCAT     Size category for aggregate fact tables
    ADIMDATCLS     Data class for aggregate dimension tables
    ADIMSIZCAT     Size category for aggregate dimension tables
    Furthermore see overview of RSDODSOu2019s fields for DSO objects as InfoProvider with link to data class:
    ODSADATCLS     Data class for table with active data of the ODS
    ODSMDATCLS     Data class for table with ODS input data
    To see all available data classes check table: DDART (DD: Data Class in Technical Settings)
    To see all available size categories check table: DGKAT (DD: Size category in technical settings)
    Hope this is helpful.
    Regards
    Snehith

  • Processing classes , evaluation classes and cumulation classes

    Hi All ,
       Can anybody give the details of PCR in HR and how to use processing classes and evaluation classes in PCR.
    Regards ,
    Santosh.

    Hi,
    we have an operation VWTCL which checks the Processing class and its specification in PCR.
    go to T.Code: PE04 and check the operations documentation you will get clarity.
    Operation VWTCL VV reads the specification of processing class VV for the current wage type in table T512W, and enters this as a single-character entry in the variable argument of the personnel calculation rule. Function VWTCL is a decision operation.
    for example:
    X010 Determination of valuation bases INTERNATIONAL
            VWTCL 01   Processing class
                ERROR      Cancel processing
              0
                ADDWT *    OT   Output table
        1
            VWTCL 01   Processing class
              0
              1
                ADDWT *    OT   Output table
                ELIMI Z    Elim.time period ID
    Regards,
    mohammed

  • LinkedList class and ArrayList class

    Hi everyone,
    What is difference between LinkedList class and ArrayList class ??

    Hi samue!
    If you had typed that question you would have got many answers.anyway
    difference between Linked List and ArrayList
    1.In linked list each element is stored as an object but not in arraylist
    2.Linked list need iterator to go through its contents but not arraylist
    3.reading element from each takes same time but if you want to add or remove element from the arraylist it takes considerable amount of time depending on the index number. in Linkedlist case it takes constant amount of time to add/remove at any index.
    this should be enough guess to know the difference but if u need try goooogle

  • What are exception class and persistant class?

    hi,
    what are exception class and persistant class?
    how are they different from the normal class?
    Regards,
    Anil

    Hii!
      Persistent Classes
    To use the Persistence Service for objects, the classes of these objects must be created as persistent classes in the Class Builder. The term persistent class does not imply that a class is persistent. (As a template for objects, every class is persistent). Rather, it means that the objects of that class and their state are managed by the Persistence Service. For example, the objects of these classes are instantiated in the ABAP program with a method of the Persistence Service, which ensures that the initialization is correct (not with the usual CREATE OBJECT statement). When the Class Builder creates a persistent class, it automatically generates an associated class, known as the class actor or class agent, whose methods manage the objects of persistent classes. As well as their identity, persistent classes can contain key attributes, which allow the Persistence Service to ensure that the content of each persistent object is unique.
      Check out this link
    http://www.sapnet.ru/abap_docu/ABENABAP_EXCEPTION_CLASSES.htm
    Regards
    Abhijeet

  • Difference between ArrayList class and LinkedList class

    I would like to ask what is the difference between the ArrayList class and the LinkedList class? If I use ArrayList class can I have a fixed size?
    Thank you for your answers.

    I often use LinkedList when I need a FIFO. When all you're doing is adding to the end of a list and removing the first element, it is definitely faster. Here's a quick SSCCE I wrote up to demonstrate:import java.util.*;
    public class ListTest {
       public static void main(String[] args) {
          LinkedList<Integer> linked = new LinkedList<Integer>();
          ArrayList<Integer> array = new ArrayList<Integer>();
          Integer[] values = new Integer[2500000];
          for (int i = 0; i < values.length; i++) {
             values[i] = new Integer(i);
          Random rand = new Random();
          boolean[] randDir = new boolean[values.length];
          for (int i = 0; i < randDir.length; i++) {
             randDir[i] = rand.nextBoolean();
          long startTime, endTime;
          startTime = System.currentTimeMillis();
          for (int i = 0; i < values.length; i++) {
             if (linked.size() > 0 && randDir) {
    linked.removeFirst();
    else {
    linked.addLast(values[i]);
    endTime = System.currentTimeMillis();
    linked.clear();
    System.out.println("linked:"+(endTime-startTime));
    startTime = System.currentTimeMillis();
    for (int i = 0; i < values.length; i++) {
    if (array.size() > 0 && randDir[i]) {
    array.remove(0);
    else {
    array.add(values[i]);
    endTime = System.currentTimeMillis();
    System.out.println("array:"+(endTime-startTime));
    array.clear();

  • Difference between Data Class and Delivery Class

    What is the Difference between Data Class and Delivery Class , what happens Phisically to the Data .
    Moderator message: what is the difference between your question and a question that we'd welcome here in the forums?
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    Edited by: Thomas Zloch on Nov 22, 2010 1:17 PM

    What is the Difference between Data Class and Delivery Class , what happens Phisically to the Data .
    Moderator message: what is the difference between your question and a question that we'd welcome here in the forums?
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    Edited by: Thomas Zloch on Nov 22, 2010 1:17 PM

  • Singleton pattern class and static class

    Hi,
    what is difference between the singleton pattern class and static class ?
    in singleton pattern, we declare a static member[which hold one value at a time] ,static method[ which return static member value] and a private constructor[not allow to direct instantiation]. My words are -- as a singleton pattern we implement static class .
    so can we say a singleton pattern is static class it means both are same or is any difference between these two ??

    malcolmmc wrote:
    On several occasions I've had to convert a static (never instanceated) class to a singleton type, for example because I realise I need an instance per thread, or I decide to make a program more modular, with more than one configuration.
    I've never done the opposite.
    So generally I favour the singleton if there any "state" involved, because it's more flexible in unanticipated directions. It also gives extra flexibility when building tests, especially if you program to an interface.Total agreement; if anything it is dead hard to override static method logic with mock code in unit tests (I had to do it by keeping the static methods in place but making them internally use a singleton instance of itself of which the instance variable could be overwritten with a mock implementation for unit testing purposes...).
    'Static classes' and/or methods are great for very simple util functions, but I wouldn't use them for anything other than that.

Maybe you are looking for

  • ICal print menu will not come up

    I have been trying to print my iCal calendar from my PowerBook G4, but the print menu will not come up. I have printed it from here before, so where did the print menu go? Help!

  • Installing Windows 7 - New Mac Mini no Optical Drive

    Hello, I would like to install a Windows 7 on a new 2011 no optical disk mini. I am aware of how to do that, and what do I need to prepare, becouse there is not a optical disk in a mini. Any ideas on if I can buy (download) a Windows 7 from www.micro

  • Aperture not working with OS 10.6.7

    Hi, I had to restore my Macbook Pro from time machine due to disc corruption issues. Now Aperture 3 is no longer starting and the error message states that the software is not compatible with the OS system. Have downloaded the aperture programme agai

  • How to write a Web service Handler without modifying the Web service code

    Hi, How can I write a SOAPHandler without modifying the Web service code. I want to add a generic handler which will take care of SOAPHeader for all the webmethods. To add a handler is it necessary to modify the web service code?

  • Create Window with Textbox and Button For getting Input Value

    Hi All, I have create plugin application but i want to take input from user. Therefore i want to create window with textbox and button. please may i get solution...