Using "." in CLASSPATH

I am following the Tomcat/servlet tutorial at http://www.moreservlets.com/Using-Tomcat-4.html
It's all been going great, until "Test 3: A Servlet That Uses Packages and Utilities". When I try to compile the servlet, I get an error because it can't find the class needed. They are both in the same folder. The tutorial says to include "." in my CLASSPATH variable. I have done that, but it still doesn't work. Here is what my CLASSPATH looks like...
.;C:\ServletDevel;C:\j2sdk1.4.0_01\jre\lib\ext\servlet.jar
How do I get the servlet to compile with the class in the same folder?

first, if you're using the java compiler installed under C:\j2sdk1.4.0_01 you don't need to include C:\j2sdk1.4.0_01\jre\lib\ext\servlet.jar in your class path.
second, some things to look out for:
are you using package names in your source? if you are, you should use the -d switch to javac to make it put the compiled classes in some directory. you should also make this directory part of you class path instead of ".". -d makes javac put the compiled file into a sub-directory with the same name as the package, which is where the java command will later look for it.
are you compiling your java files one by one, or are you using a wild card? by using a wild card, like "javac *.java", the compiler will compile all the files at once, taking care of dependencies as well.
when you're saying the "missing" class is in the same directory, do you mean the .class file or the .java file? if you're using package names in the source code, the .class file will not be searched for in the same directory, even if it's in the class path. the java command tries to find the .class file by going through the class path, and for each directory found it will append the package name of the class to the directory name, then look for the class file in the subdirectory so named.
here's an example:
java Foo.java Bar.javawhere both Foo and Bar are specified to be in the package foo.bar, will create the files Foo.class and Bar.class in the directory where you did the compile. If you set the class path to "." and try to run foo using
java Foohowever, it won't work, for several reasons.
first of all, the command should actually be
java foo.bar.Foobecause java needs the full class name of the class it's going to run, as input.
second, that command wont work either, because, with the class path set to ".", java will look for the class foo.bar.Foo in the directory "./foo/bar". so you need to either put your .class files into this directory, or run javac with the -d option.
here's how you would make it all work:
- set CLASSPATH to an existing directory, eg. "classes"
CLASSPATH=classes- compile using wildcards and -d
javac -d classes *.java- verify that your class files were put in a sub directory under "classes"
- run the class "Foo" (or copy everything to where the servlet engine wants it)
java foo.bar.Foo

Similar Messages

  • How to use the classpath defined in a manifest file when debugging

    Using Jdeveloper 10.1.3.3.0 (or any version)
    I'd like to be able to debug using an executable jar which specifies my classpath and main class, without having to manually add all the jars to my debug configuration. Is there a way the debugger can extract that information from the manifest?
    The set of jar files included in my classpath varies depending on which client configuration the client wants to run and we could potentially have a hundred different configurations so there isn't an easy way to manage static libraries. Currently I have to open the jar, extract the manifest and manually add the jars so I can debug. Which is really painful when the configuration can change each time I run. The manifest and jar file are created at runtime based on what client configuration the user is trying to run and there can be multiple versions of a jar file in the directory with mangled names - so I can't just include all the jars.
    Any ideas?

    Run the program from command line, this way you will see the errors, if any.
    example.: java -jar theJarfile.jar
    I was successful in creating a comm application. I placed the win32com.dll in the same directory of my application jar file and all worked.
    I also extracted the comm.jar , and jar'd my app with the extracted comm files to make one jar.
    I also had a fileWriter() to get the clients jre path and my app would write the javax.properties file to the correct place.
    It took me severel weeks and late nights to accomplish this, but it was all necessary to be able to install only my app, and not a bunch of api's that were needed.

  • JDeveloper, ADF, Quartz: Quartz Using different Classpath than Backing bean

    Hi,
    I have an ADF 10g application. When i get an Application module using Configuration.createRootApplicationModule, it works fine in normal java class or backing bean.
    Now i have an quartz configured in this project. The same code does not work in Quartz Job class.
    When i print the classpath using System.getProperty("java.class.path") in normal java class or backing bean, then it considers everything along with BC4J jar files. But when i print the same thing in quartz job, it has only two jar files inside its class path: C:\JDeveloper\j2ee\home\oc4j.jar;C:\JDeveloper\jdev\lib\jdev-oc4j-embedded.jar.
    Can anyone let me know what could be the issue if someone has configured Quartz with JDeveloper and ADF application.
    --Chintan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi!
    Have you solved this problem? If yes, can you share the solution.
    Regrads,
    Sašo

  • How to run the program using specific classpath

    Recently I installed Javamail 1.2 and JAF1.0.1 on my NT Box and set up the classpath. I can compile my java email code by using: javac myEmail.java. But when I tried to run the code using java myEmail, it always gives the error: Exception in thread "main" java.lang.NoClassDefFoundError: myEmail.
    when I use -verbose and found that it always goes to:
    C:\Program Files\JavaSoft\JRE\1.3.1\lib\rt.jar to find classes even I use -cp option to point Javamail\mail.jar and activation.jar.
    what is wrong with it? Thank you in advance!!!!!!

    What does this have to do with JMS. I suggest that this should have been posted to the Java Programming forum where you would have gotten a quick response as this is a simple problem to diagnose.
    The problem is that the class myEmail, which you created, is not on the class path so it cannot find it. It has nothing to do with the location of mail.jar and activation.jar, although this may cause problems later.
    What you need to do is check the classpath in the environment variables section of the System dialog box. Make sure it refers to . (the current directory) as well as the locations of mail.jar and activation.jar. Also when you invoke myEmail ensure you are in the same directory.
    Hope this helps

  • Cant use packages/classpaths correctly _ never could too

    Hello,
    I have a directory C:\DIR
    In this directory I have a program. Two files both declare the package a.b package a.b;. Both files are in the directory C:\DIR\a\b.
    One of my files is KeyInput.java which implements KeyListener for obvious reasons.
    The second file is Main.java which has a Frame frame to which I want to add a KeyListener: frame.addKeyListener(new KeyInput()); Now, this works perfectly fine when I have KeyInput as an inner class, but using this (the above) architecture my compiler can't find KeyInput.
    I have not set a classpath (though I did try that in my compiling command "javac -classpath C:\ Main.java", but that did not work).
    I did check all sorts of documentation on this, so please don't answer that I should do just that. I can't get it running. Until now my remedy was not using packages, but I want to.
    Please tell me what I am doing wrong,
    Q
    thanks

    I now have another basic problem with these two classes, which concerns the concept "static".
    Here's the problem:
    When I add a KeyListener to frame as above I instantiate a KeyInput.
    In KeyInput I for instance want to use a key to quit the program. (I also want a lot of other things, but
    the same problem applies to them) To do this I create a method "public void kill( )" in Main. mainInst is
    an instance of Main (created in the public static void main (String[] args) method), but my instance of KeyInput does not know him.
    So now I have a problem. Because I either have to make my instance of KeyInput know mainInst so it
    can do "mainInst.kill( )", which I do not know how to do; or I have to use the Main class itself. However:
    Main.kill( ) does not work, because kill isn't static. I could make kill static, but then I have a static context
    where I don't want any, for know I have a boolean running which has to be declared static etc. etc., and
    then I'm not even talking about all the other things to do with the keys.
    Ok, one solution is simple... make KeyInput an inner class of Main. But I don't want that! It will wreck
    all the little beauty present in my programmature. So what do I do? How does a professional do this? It's such a basic problem I must know the answer.
    Many thanks,
    Q

  • NoClassDefFoundError when using a classpath switch

    Hello,
    When i try to run some code on a solaris machine i am getting a noclassdeffound when I try to execute my main class
    the command im using to execute is
    /usr/j2sdk1.4.2_05/bin/java -classpath "/opt/TimesTen/5_0/jdbc/lib/classes14.jar;/usr/j2sdk1.4.2_05;." Mainmy main class is
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    public class Main {
            public static void main(String[] args)  {
                    Server sv = new Server();
                    sv.start();
    }I don't have access to create a class path so im just trying to set it from the command line, however if i just issue java Main the program runs. This is on Solaris 8

    On Solaris the classpath element seperator is a colon, not a semi-colon like it is in Windows.
    ... -classpath /opt/TimesTen/5_0/jdbc/lib/classes14.jar:. ...
    Sigh Too late, as already covered by another poster above.
    But this still applies:
    ... And there should be no need to include /usr/j2sdk1.4.2_05 in the classpath.
    Message was edited by:
    warnerja

  • Use of deployment classpath or shared-libraries to pick-up "custom" classes

    Hi,
    I’m trying to determine an approach to dealing with how classes are found in a deployed ADF application via classpath, etc. I’ve tried to explain the situation below as best I can so it’s clear. If you have any comments/suggestions as to how this could be done, it would be much appreciated
    Current Application structure:
    Consists of an application initially deployed to OC4J 10.1.3.4 using an alesco-wss.ear file
    Application contains a single Web Module, initially deployed as wss.war file within the alesco-wss.ear file above.
    The Web Module (wss) was built in JDeveloper 10.1.3.4 using 2 projects, a Model and ViewController project, and uses ADFBC.
    The Model project seems to also generate an alesco-model.jar file in the /WEB-INF/lib/ folder, even though Model classes are in the /WEB-INF/classes/ folder below?
    Exploded structure of application on application server looks something like:
    applications/alesco-wss/META-INF/
    /application.xml <- specifies settings for the Application such as Web Module settings
    /wss/
    /app/ <- directory containing application .jspx pages protected by security
    /images/ <- directory containing application images
    /infrastructure/ <- directory containing .jspx files for login, logout and error reduced security
    /skins/ <- directory containing Skin image, CSS and other files
    /WEB-INF/
    /classes/ <- directory containing application runtime class files as per package sub-directories
    /lib/ <- JAR files used by application (could move some to shared-libaries?) – seems to contain alesco-model.jar
    /regions/ <- directory containing .jspx pages used for Regions within JSPX template page
    /templates/ <- directory containing template .jspx pages used for development (not really required for deployment)
    /adf-faces-config.xml
    /adf-faces-skins.xml
    /faces-config.xml
    /faces-config-backing.xml
    /faces-config-nav.xml
    /region-metadata.xml
    /web.xml
    testpage.jspx <- Publicly accessible page just to test
    The application runs successfully using the above deployment structure.
    We plan to use the exploded deployment structure so that updates to pages, etc. can be applied individually rather than requiring construction and re-deployment of complete .EAR or .JAR files.
    What I’m trying to determine/establish is whether there is a mechanism to cater for a customisation of a class, where such a class would be used instead of the original class, perhaps using a classpath mechanism or shared library?
    For example, say there is a class “talent2.alesco.model.libraries.ModelUtil.class”, this would in the above structure be found under:
    applications/alesco-wss/META-INF/classes/talent2/alesco/model/libraries/ModelUtil.class
    Classes using the above class would import “talent2.alesco.model.libraries.ModelUtil”, so they effectively use that full-reference to the class (talent2.alesco.model.libraries as a path, either expanded or within a JAR).
    From the Oracle Containers for J2EE Developer’s Guide 10.1.3 page 3-17, it lists the following:
    Table 3–1 Configuration Options Affecting Class Visibility
    Classloader Configuration Option
    Configured shared library <code-source> in server.xml
    <import-shared-library> in server.xml
    app-name.root <import-shared-library> in orion-application.xml
    <library> jars/directories in orion-application.xml
    <ejb> JARs in orion-application.xml
    RAR file: all JARs at the root.
    RAR file: <native-library> directory paths.
    Manifest Class-Path of above JARs
    app-name.web.web-mod-name WAR file: Manifest Class-Path
    WAR file: WEB-INF/classes
    WAR file: WEB-INF/lib/ all JARs
    <classpath> jars/directories in orion-web.xml
    Manifest Class-Path of above jars.
    search-local-classes-first attribute in orion-web.xml
    Shared libraries are inherited from the app root.
    We have reasons why we prefer not to use .JAR files for these “non-standard” or “replaced” classes, so prefer an option that doesn’t involve creating a .JAR file.
    Our ideal solution would be to have such classes placed in an alternate directory that is referred to in a classpath such that IF a class exists in that location, it will be used instead of the one in the WEB-INF/classes/ directories, and if not such class is found it would then locate it in the WEB-INF/classes/ directories.
    - Can a classpath be set to look for such classes in a directory?
    - Do the classes have to replicate the original package directory structure within that directory (<dir>/talent2/alesco/model/libraries)?
    - If the class were put in such a directory, without replicating the original package directory structure, I assume the referencing “import” statements would not locate it correctly.
    - Is the classpath mechanism “clever” enough to search the package directory structure to locate the class (i.e. just points to <dir>)?
    - Or would the classpath mechanism require each individual path replicating the package structure to be added (i.e. <dir>/talent2/alesco/model/libraries/ and any other such package path)?
    If we are “forced” to resort to the use of JAR files, does a JAR file used for the purpose of overwrite/extending a sub-set of classes in the original location need to contain ALL related package classes? Or does it effectively “superset” classes it finds in all JAR files, etc. in the whole classpath? That is, it finds talent2.alesco.model.libraries.ModelUtil in the custom.jar file and happily goes on to get the remainder of talent2.alesco.model.libraries classes in the other core JAR/location. Or does it need all of them to be in the first JAR file for that package?
    Any help would be appreciated to understand how these various class visibility mechanisms could be used to achieve what is required would be appreciated.
    Gene

    So, nobody's had any experience with deploying an ADF application, and providing a means for a client to place custom classes in such a way as they're used in preference to the standard application class, effectively to implement a customised class without overwriting the original "standard" class?
    Gene

  • Did u use jar files as classpath for appletviewer?

    as tested, jar files can not be used as classpath for appletviewer.
    java command is bellow
    appletviewer -J-classpath -Jc:\folder00\some.jar; -Jc:\folder01\any.jar; MyAppletClass
    the jar files (or classpaths) above do not work.
    I am not sure about my test, so i post my Q here for confirming it.
    thx

    appletviewer needs HTML code to run an Applet similar to how the Applet would be run from a browser. It does not have a Classpath option.
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/appletviewer.html

  • Adding a jar to the classpath of an executable jar (mixing -jar and -cp)

    Hello,
    frankly I hesitated over posting this to "New to Java"; my apologies (but also, eternal gratefulness) if there is an ultra-simple answer I have overlooked...
    I integrate a black-box app (I'm not supposed to have the source) that comes packaged as an executable jar (with a Manifest.MF that specifies the main class and a bunch of dependent jars), along with a few dependent jars and a startup script. Long story short, the application code supports adding jars in the classpath, but I can't find a painless way to add a jar in its "classpath".
    The app's "vendor" (another department of my customer company) has a slow turnaround on support requests, so while waiting for their suggestion as to how exactly to integrate custom jars, I'm trying to find a solution at the pure Java level.
    The startup script features a "just run the jar" launch line:
    java -jar startup.jarI tried tweaking this line to add a custom jar in the classpath
    java -cp mycustomclasses.jar -jar startup.jarBut that didn't seem to work ( NoClassDefFound at the point where the extension class is supposed to be loaded).
    I tried various combination of order, -cp/-classpath, using the CLASSPATH environment variable,... and eventually gave up and devised a manual launch line, which obviously worked:
    java -cp startup.jar;dependency1.jar;dependency2.jar;mycustomclasses.jar fully.qualified.name.of.StartupClassI resent this approach though, which not only makes me have to know the main class of the app, but also forces me to specify all the dependencies explicitly (the whole content of the Manifest's class-path entry).
    I'm surprised there isn't another approach: really, can't I mix -jar and -cp options?
    - [url http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html]This document (apparently a bible on the CLASSPATH), pointed out by a repited forum member recently, does not document the -jar option.
    - the [url http://download.oracle.com/javase/tutorial/deployment/jar/run.html]Java tutorial describes how to use the -jar option, but does not mention how it could play along with -cp
    Thanks in advance, and best regards,
    J.
    Edited by: jduprez on Dec 7, 2010 11:35 PM
    Ahem, the "Java application launcher" page bundled with the JDK doc (http://download.oracle.com/javase/6/docs/technotes/tools/windows/java.html) specifies that +When you use [the -jar] option, the JAR file is the source of all user classes, and other user class path settings are ignored+
    So this behavior is deliberate indeed... my chances diminish to find a way around other than specifying the full classpath and main class...

    I would have thought that the main-class attribute of the JAR you name in the -jar option is the one that is executed.Then I still have the burden of copying that from the initial startup.jar's manifest. Slightly less annoying than copying the whole Class-path entry, but it's an impediment to integrating it as a "black-box".
    The 'cascading' behavior is implicit in the specification
    I know at least one regular in addition to me that would issue some irony about putting those terms together :o)
    Anyway, thank you for confirming the original issue, and merci beaucoup for your handy "wrapper" trick.
    I'll revisit the post markers once I've actually tried it.
    Best regards,
    Jérôme

  • HOw to create a Batch file for java application and whats the use of this ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    First of all, you're OT.
    Second, you can find this everywhere in the net.
    If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
    javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
    Otherwise use:
    javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
    Don't specify the .class extension.
    Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
    The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
    This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
    Finally add dukes and give 'hem away.
    Bye.

  • Creating a JAR using JDIC  PROBLEMS in creating a JAR!!!

    Hi
    I am trying to work with JDIC APIs in my Java application. I wish to open a browser on clicking a button in my application which uses Java Swing.
    I included the location of the JDIC.jar in my class_path under environmental variables in Windows.
    However, despite that I am having to compile using the classpath option with javac.
    After compiling using javac, I again have to run it using java and the classpath option.
    I am now trying to create a jar of my application including the JDIC.jar as well.
    However I am unable to do this successfully.
    Since this is my first time working with a 3rd party API orher than the standard Java API, I am stumbling about and would GREATLY appreciate some guidance

    Hi
    Thanks a lot!
    I got SOME response!!!
    Well okie..
    I have the JDIC library at C:\jdic-0.9.1-bin-cross-platform
    with the jar at C:\jdic-0.9.1-bin-cross-platform\jdic.jar
    My application is at
    C:\VDApp
    The packagename is GeneViewer
    So I am doing the following
    C:\VDApp> javac -classpath DOT; C:\jdic-.....\jdic.jar GeneViewer\MainClass.java
    C:\VDApp>java -classpath DOT;c:\jdic.....\jdic.jar GeneViewer.MainClass
    I am trying to create a jar as follows
    C:VDApp> jar cmf manifest.mf GeneViewer.jar GeneViewer C:\jdic...\jdic.jar
    The manifest.mf file contains 1 line
    Main-Class: GeneViewer.MainClass
    Although the jar file is created successfully, when I try to run it, it doesnt run properly. It throws that error message. cannot find /org/etc etc...
    All those hierarchy exist only in C:\jdic-0.9.1-crossplatform....
    Please guide me further
    Thanks

  • About path and classpath in linux

    How to set classpath and path in Linux.
    thank you very much!

    The class path can be set using either the -classpath option when calling an SDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value.
    % sdkTool -classpath path1:path2...
    -or-
    % setenv CLASSPATH path1:path2...
    where:
    sdkTool
    A command-line tool, such as java, javac, or javadoc. For a listing, see SDK Tools.
    path1:path2
    Paths to the .jar, .zip or .class files. Each path should end with a filename or directory depending on what you are setting the class path to:
    For a .jar or .zip file that contains .class files, the path ends with the name of the .zip or .jar file.
    For .class files in an unnamed package, the path ends with the directory that contains the .class files.
    For .class files in a named package, the path ends with the directory that contains the "root" package (the first package in the full package name).
    Multiple path entries are separated by colons.
    The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include "." in the new settings.
    Classpath entries that are not either a directory or an archive (.zip or .jar file) are ignored.

  • Path and classpath

    How do i set path and classpath in java? why it is needed

    ramyabaskar wrote:
    How do i set path and classpath in java? why it is neededTypically you do not set these in java.
    You set the path in the operating system shell.
    You set path so you can launch java by just typing java
    instead of having to type the full path to "C:\Program Files\Java\jre6\bin\java.exe".
    You pass the desired classpath to java when you launch java with the classpath option or set it in the operating system shell using the CLASSPATH env.var.

  • Directory structure suggestions, for keeping tidy classpath

    Suggestions for setting up my directory (learning area, devel area etc.)
    ok, so this classpath thing seems to have the potential to make a real mess�can anyone suggest how I might alter my directory to limit the numberof additions I have to make to my classpath variable?
    presently I have a directory off of my root for the various books I use:
    C:\jJavaJunkYard < txtbook
    C:\jTextBookDL < txtbook
    C:\jJavaCoreFundamentals < txtbook
    C:\jTheJavaTutorial < txtbook
    C:\jThinkingInJava < txtbook
    C:\jJavaHowTo < txtbook
    C:\jDevl << java development area
    C:\jdk14 << java exe & doc
    C:\jdkLanguageSpecDoc << java lang specifications
    and of course under each txtbook, I have
    ch1, ch2,ch3� etc.
    how can I set up my directory so that my classpath does not get too messy?

    that idea kinda scares me... i have probably thousands
    of files...
    but if no one else bothers to answer...
    you'll get the dukes...
    thank you for bothering to answerThousands of files? Are these separate classes which you have created? If so you should consider organizing these files by package. (I hope I am understanding your question as you meant it).
    Use the package statement, eg.
    package com.accuchekinc.pc5250;to tell the compile where to put the class.
    Use the import statement, eg
    import com.accuchekinc.pc5250;to retrieve the class by another class which uses it.
    Then you only have to make sure that "com" is in one of the folders in the class path statement.
    I wholeheartedly agree with the previous suggestion that you use the -classpath (or -cp) parameter of javac.exe and java.exe to establish unique sets of class paths per project.
    Good luck. I've been watching your topic for ideas a well.

  • Error using xmlparserv2-904.jar in Reports9i to BI Publisher conversion

    I'm attempting a conversion of an Oracle Reports9i report in XML format to BI Publisher, as described in http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e10416/convertrpts.htm.
    I run the following command:
    java.exe -classpath %classpath% oracle.apps.xdo.rdfparser.BIPBatchConversion -source F:\CF_Reports_10g -target F:\CF_Reports_OBI -debug
    This returns the following error:
    java.lang.UnsupportedClassVersionError: /oracle/apps/xdo/rdfparser/BIPBatchConversion (Unsupported major.minor version 49.0)
    The above web page specifies that xmlparserv2-904.jar be used in %classpath%. However, my installation of JDK6 update 14 doesn't contain this library. It only contains xmlparserv2.jar, so I use this in %classpath%.
    I'm assuming that this is causing the error.
    I also installed JDK5 update 17, but got the same error.
    Has anyone had any experience of this?
    Thanks,
    Stephen

    Hi,
    I am unable to locate in xmlparserv2-904.jar under JAVA_TOP/classes in oracle apps. Or in Oracle TopLink Software Downloads. Were you able to download/locate these mandatory files?
    Thanks,
    XRAV

  • Add classpath in an executable jar file

    an executable jar file contains a manifest file with entry main-class: MyApplicationClass.
    if we double click the jar file on Windows OS, main class is loaded.
    my question is:
    if classes in he jar file use classpaths which are not default, how to add those classpaths into manifest file to tell classes to use those classpaths?
    it is similar to command line:
    java -classpath c;\mypackage; .......; MyApplicationClass

    Thanks, i will try soon.
    here is another Q.
    if i need to add tools.jar (JDK lib) as classpath in manifest file, it is as following in my PC
    d:\install\java\jdk14101\lib\tools.jar.
    but my customers install JDK in different path (should be considered as unknown), how to add it as entry Class-path for all customers?

Maybe you are looking for

  • Printing list view -- only 1 page?

    I've just switched from Windows and Outlook to Mac with iCal and Entourage. When I try to print from iCal in list view so I can see all the info relating to events it won't let me print more than can fit on 1 page (I use A4), limiting me to only a fe

  • Can I open files in PS 5.1 in a PS 5 installation?

    Hi. I am taking a photoshop class. The classroom pc uses PS 5 for Mac. And, I have PS 5.1. (part of Adobe Production Premium 5.5) for Windows Can PS 5 open files created in PS 5.1?

  • Animated gif image

    Hi I like to create an animated gif image from a given set of images with java. I like to do this with the given set of java api as I do not want to use a commercial graphics library. Can anyone provide me with a sample example. Thanks

  • Make text fit TextField

    Hi I'm new at this and do have a major (to me) prob. I'm using LC Designer ES ver. 8.2. I want font size to schrink as I type in a TextField, so the text allways fit and fill in a fixed sized TextField with multiline. I know how to make the TextField

  • Content bundler problem!

    when i try to bundle my documents it says: Inhoud genereren [Fout: Ongeldige waarde voor parameter 'portraitDocument' van methode 'exportMiniFolio'. Document verwacht, maar /Users/user/Library/Preferences/StageManager.BD092818F67280F4B42B04877600987F