Urgent help with jar file

I'm writing a program in VB that calls on a JAR file. It has been working great for weeks. Last night, I moved the JAR file to a new location on my machine, and it suddenly stopped working at all.
I know nothing about Java. Do I need to recompile the file? I tried moving the whole directory back to its original location but it didn't help.
Thanks in advance.

Dude I'm telling you straight up, the program has a bug. The evidence is in the error message. Maybe the bug was not manifested before, but it was there.
Do you have access to the source? Do you know how to compile it? You should recompile it with the -g flag to include debug information. Then the error message will include a method name and line number for the offending portion of code. If you're not able to figure it out yourself, you could post that portion of code here for someone to comment on.

Similar Messages

  • Now what? Help with .jar files

    Hey. I just finished a program. I want to share it with my friends or anyone else. I can create a .jar file but I have no idea what to do next. Is there an easy way to "publish" your programs (like create a .exe file?). Any help or ideas would be appreciated. Thanks, Merlot14

    java -jar MyFile.jarwill work if you've set your manifest correctly. If you're distributing only to Windows users, you could include a shortcut, I believe. Similarly, for distribution to Linux/OS X users, you could include a shell script.

  • Need help with jar files

    I have made an application that uses the javax.comm library for serial port drivers. It works perfectely but when I put all the .class in a .jar and start the application it starts properly with no errors but it doesn't see the com's of the computer.
    I would apreciate if you could help me out
    greetings
    paul

    You have to modify the source code of the javax.comm class files you are using.. the line contains "package javax.comm;" should be deleted. And then compile those modified files and put the compiled files to your jar file. Or you can create a folder "javax" and subfolder "comm" in that folder and put those original .class files into "javax/comm". After that, put that "javax" folder into your jar file.

  • Please Help With Jar File

    I have a jar file named Helper.jar with
    com.xyz.util.Helper.class in it.
    Now I have a SrcFile.java that
    imports com.xyz.util.Helper;
    It compiles fine with:
    java -classpath Helper.jar;. SrcFile.java
    ...and runs fine with:
    java -cp Helper.jar;. SrcFile
    When I jar it with:
    jar cvfm SrcFile.jar SrcFile.mf *.class
    ...and run it with:
    java -cp Helper.jar;. -jar SrcFile.jar
    I get the following exception:
    java.lang.NoClassDefFoundError: com/xyz/util/Helper
    ...but yet, Helpler.jar runs fine with:
    java -jar Helper.jar
    Does anyone have any idea what I am doing wrong or
    do I have to un-jar the Helper.jar file and
    re-jar SrcFile.jar with all the .class files?

    I've replied to this same thread in the New To Java Technology fourm, see there for a suggestion.

  • Help with JAR Files

    OK, folks, I need some help here...
    And I have researched on this prior to this post, but I still don't get it.
    I have a simple application in Reminder.java file. When I compile it, I get Reminder.class and Reminder$ReminderThread.class, because I have an inner class.
    I place those files in Reminder directory. I want to make an executable JAR file, so I made a manifest file outside the Reminder directory that contains these lines
    Manifest-Version: 1.0
    Main-Class: Reminder.Remindersince the Reminder.class is within the Reminder directory, I understood I had to have a prefix "Reminder."
    In the command line, I type
    jar cmf manifest Reminder.jar Reminder/Reminder.class Reminder/Reminder$ReminderThread.classAnd I do get a Reminder.jar file, but when I double-click on it, I get a popup saying "Could not find the main class. Program will exit!"
    So, what am I doing wrong and how can I fix this? As I said, I have researched, but I can't understand what went wrong nor how to fix the problem.
    Any help will be greatly appreciated.

    Never mind, I solved it, I was missing a carriage return in my manifest file. I feel so stupid now...

  • Newbie help with JAR files

    Okay,
    I built a simple Hello World project with Swing and it worked. Now I've build my own program from scratch and get a "Cannot find the main class" error from the JRE. Below are the contents of the manafest file craeted by Sun Java Studio 8.
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.2
    Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
    Main-Class: localPkg.mainForm
    X-COMMENT: Main-Class will be added automatically by build
    Also here is the source code for localPkg.mainForm
    * mainForm.java
    * Created on January 17, 2006, 9:32 AM
    * @author rowen
    package localPkg;
    import java.beans.*;
    public class mainForm extends javax.swing.JFrame {
    /** Creates new form mainForm */
    public mainForm() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    ctoF1 = new MyBeans.CtoF();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    numericField1 = new magicbeans.NumericField();
    numericField2 = new magicbeans.NumericField();
    ctoF1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    ctoF1PropertyChange(evt);
    ctoF1PropertyChange1(evt);
    getContentPane().setLayout(new java.awt.GridBagLayout());
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jLabel1.setText("Farenheight");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(20, 110, 0, 0);
    getContentPane().add(jLabel1, gridBagConstraints);
    jLabel2.setText("Celsius");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(11, 110, 0, 0);
    getContentPane().add(jLabel2, gridBagConstraints);
    numericField1.setText("farenheightField");
    numericField1.setName("farenheightField");
    numericField1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    numericField1PropertyChange(evt);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.ipadx = 119;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(6, 110, 0, 160);
    getContentPane().add(numericField1, gridBagConstraints);
    numericField2.setText("celsiusField");
    numericField2.setName("celsiusField");
    numericField2.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    numericField2PropertyChange(evt);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.ipadx = 99;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(6, 110, 191, 0);
    getContentPane().add(numericField2, gridBagConstraints);
    pack();
    // </editor-fold>
    private void numericField2PropertyChange(java.beans.PropertyChangeEvent evt) {                                            
    ctoF1.setC(numericField2.getValue());
    private void numericField1PropertyChange(java.beans.PropertyChangeEvent evt) {                                            
    ctoF1.setF(numericField1.getValue());
    private void ctoF1PropertyChange1(java.beans.PropertyChangeEvent evt) {                                     
    numericField2.setValue(ctoF1.getC());
    private void ctoF1PropertyChange(java.beans.PropertyChangeEvent evt) {                                    
    numericField1.setValue(ctoF1.getF());
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new mainForm().setVisible(true);
    // Variables declaration - do not modify
    private MyBeans.CtoF ctoF1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private magicbeans.NumericField numericField1;
    private magicbeans.NumericField numericField2;
    // End of variables declaration
    Using Sun Java Studio Enterprise 8 (patch 1), on Windows XP (most recent patches)
    Thanks in advance,
    Roy

    R_Owen ,
    One possible way of how to do it in JSE8 is:
    1. Put all necessary lib jars to some place under src folder.
    2. Add those jars into Compile-time libraries list (Project properties -> Libraries) for correct compilation
    3. Switch to 'Files' JSE8 tab, open manifest.mf file (it's in projects root) and add your lib jars to it.
    Syntax is:
    Class-Path: relative URLs
    That's it.
    And Class-Path attribute description from JAR File Specification:
    http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Main%20Attributes:
    �Class-Path:
    The value of this attribute specifies the relative URLs of the extensions or
    libraries that this application or extension needs.
    URLs are separated by one or more spaces.
    The application or extension class loader uses the value
    of this attribute to construct its internal search path. �
    Copy/paste from:
    http://swforum.sun.com/jive/thread.jspa?forumID=122&threadID=60169

  • Help with jar files and running them

    I have been trying to figure out how to run executable java files, now I have heard that a million and one people have asked this already. Though when I see the answer to these questions I am still quite confused, I would like to understand some things. First thing is how do you even save your java code as a jar file. Secondly, what is a jar file. Thirdly, I have seen many people talking about batch files, what are they? And finally, I have used many "wrappers" and I still cannot get it to work. Plz help

    A quick google search gave me [url http://neptune.netcomp.monash.edu.au/JavaHelp/howto/jar.htm]this website about jars.

  • Need help with Jar file

    I am writing an Application in Java using swing and all that good stuff but I am currently ready to do some beta testing to find any other errors.
    The problems is I want it to be easy to use so I was just going to throw the classes ina jar file so they could just run the jar files.
    For some reason I keep getting a cannot find main class error??
    Here is the manifest file for the Jar file
    Manifest-Version: 1.0
    Created-By: 1.4.0_01 (Sun Microsystems Inc.)
    Main-Class: VRPServer.class
    VRPServer is the class that has the main in it.
    if I go to the command line and run I get
    E:\JAVA\VRP\Server>java -jar VRPServer.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: VRPServer/class
    if I double click the jar I get a pop-up saying "Could not find the main class, program will exit."
    I really don't understand Jar files all that well, I went through the tutorials but still can't see why this isn't working. Any help is appreciated. :)

    I think your problem is that you shouldn't add the '.class' to the name of your main class in your manifest; it should simply be the fully-qualified name of the class, for example:
    Manifest-Version: 1.0
    Created-By: 1.4.0_01 (Sun Microsystems Inc.)
    Main-Class: mypackage1.mypacage2.MyClassHope this is all it takes.
    Shaun

  • Help with Jar file exception

    I have been following the example of instruction at:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=332680
    But I get an exception when I do the following.
    D:\pro>jar umf mf.txt myjar.class
    java.io.IOException: invalid header field
            at java.util.jar.Attributes.read(Attributes.java:359)
            at java.util.jar.Manifest.read(Manifest.java:162)
            at java.util.jar.Manifest.<init>(Manifest.java:52)
            at sun.tools.jar.Main.update(Main.java:487)
            at sun.tools.jar.Main.run(Main.java:167)
            at sun.tools.jar.Main.main(Main.java:904)Can somebody help me on this?
    Thanks I will really appreciate.

    I cannot execute the file, after I created, and then I add the mf intothe class, I double clicked but doesn't do anything.
    Should I run it with the java -jar myjar.jar?
    When I do it it throws me the following:
    D:\z>jar cf myjar.jar myjar.class
    D:\z>jar umf mf.txt myjar.class
    D:\z>java -jar myjar.jar
    Failed to load Main-Class manifest attribute from
    myjar.jar
    D:\chris\1\z>help please.

  • Urgent Help With Connections File Needed Please

    Hello All!
    I am getting the following error when I attempt to test my
    live site. I am testing database connectivity within my site that
    is hosted by GoDaddy. All pages are ASP and the database is stored
    in the root directory in GoDaddy's folder called "access_db". The
    folder has read/write access.
    Here is the error:
    Microsoft JET Database Engine error '80040e4d'
    Cannot start your application. The workgroup information file
    is missing or opened exclusively by another user.
    /sitename/requestquote/index.asp, line 130
    Here is the code from the connections file:
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    Dim MM_connNAME_STRING
    MM_connNAME_STRING =
    "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=username\access_db\filename.mdb;UserId=usern ame;Password=password;"
    %>
    The error above refrences "/sitename/requestquote/index.asp,
    line 130", and here is the code:
    rs_quote.ActiveConnection = MM_connNAME_STRING
    Please help.
    Thanks - Matt

    Sorry Tim? This is Dave. Did you read what said? I'm not
    Matt.
    Dave
    "TC2112" <[email protected]> wrote in message
    news:[email protected]...
    > It could be, you'd have to check in the control panel to
    make sure
    > permissions are set to read and write.
    > Have you tried changing the path in your connection
    string to the GoDaddy
    > path and uploading the file?
    > The info I posted tells you how to find out what the
    path on GoDaddy is.
    >
    > Tim
    >
    >
    > "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote
    in message
    > news:[email protected]...
    > > Tim,
    > > Very good reply! I have no experience with GD other
    than the complaints
    I
    > > have read here about connections to databases etc.
    I think that if his
    > > connection test is ok that it has to be a
    permissions issue? What do you
    > > think?
    > > Dave
    > > "TC2112" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Hello,
    > >>
    > >> Sorry if some of this is repetitive in respect
    to what others have
    > >> advised
    > >> in this thread.
    > >> It's an answer I gave someone with similar
    problems a while ago.
    > >> It does answer your question about the
    successful path on your local
    > > server
    > >> being different than the path on GDs server.
    > >> There are also instructions on how to find the
    path on GD's server if
    > > needed
    > >> for DNS-Less connection.
    > >>
    > >>
    > >> Option 1:
    > >> You can try using a map path function like this
    in your connection
    > >> string:
    > >> access_db is the folder the database is in and
    mydatabase.mdb is the
    > > access
    > >> file.
    > >> Substitute your names.
    > >>
    > >> STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=" &
    > >> Server.MapPath("access_db") &
    "\mydatabase.mdb;User Id=admin;Password="
    > >>
    > >> -or-
    > >>
    > >> Option 2:
    > >> You could try an OLEDB DSN-Less connection
    instead of using a DSN. It's
    > > not
    > >> hard to do.
    > >>
    > >> Step 1 is to figure out the location of the
    root directory on the
    host's
    > >> server..That's very easy to do yourself.
    > >>
    > >> Just make an asp page (I named mine
    "findit.asp"), and put the
    following
    > >> code between the <body> tags, like so:
    > >> <body>
    > >> <%
    > >> Response.Write("The location of this page
    is:<br>")
    > >>
    Response.Write(Request.ServerVariables("PATH_TRANSLATED") &
    "<br>")
    > >> Response.Write("The location of my root
    directory is:<br>")
    > >> Response.Write(Server.MapPath("\"))
    > >> Response.Write Path
    > >> %>
    > >> </body>
    > >>
    > >>
    > >> Upload it to the same location as your site's
    home page.
    > >> Once your new asp page is uploaded, just
    navigate to that page in your
    > >> browser.
    > >>
    > >> For a site on GD the "findit.asp" page displays
    something like this:
    > >>
    > >> The location of this page is:
    > >> d:\hosting\mysite\findit.asp
    > >> The location of my root directory is:
    > >> d:\hosting\mysite
    > >>
    > >> Now that you know the root directory location
    on their server, you can
    > >> figure out the path to your database.
    > >> Let's say that the folder your database is in
    is named _private, and
    it
    > >> happens to be in the root
    > >> directory along with your home page.
    > >>
    > >> Next, just add the database folder name
    (_private) and the database
    > >> inside's name (mydatabase.mdb) to the root
    directory location:
    > >>
    > >> d:hosting\mysite\_private\mydatabase.mdb
    > >>
    > >> That's your Data Source path.
    > >>
    > >> The connection string would look something like
    this:
    > >>
    > >> = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > >>
    Source=d:hosting\mysite\_private\mydatabase.mdb;User
    ID=;Password=;"
    > >>
    > >> (the code above may appear wrapped (two lines)
    in the forum/ng but it's
    > > one
    > >> line with no return within)
    > >>
    > >> IMPORTANT: If you are using a local testing
    server, make a copy of your
    > >> connection asp page as a backup.
    > >> The reason? The connection information you are
    going to put in this
    file
    > >> will only work on the host's server.
    > >> Once you upload the new connection.asp page
    with the changes for the
    > >> host,
    > >> you'll need to change your local copy back to
    your local connection so
    it
    > >> will work on
    > >> your local testing server.
    > >>
    > >> Upload to server.
    > >>
    > >> Please note: From now on, when you upload (or
    "put" if you're using DW)
    > >> files that refer to your connection asp page
    you're going to get a
    > >> warning
    > >> that your connection asp on the host is
    different than your local copy.
    > >> Always say "No" to updating it, or you'll
    replace the GD DSN-Less
    > > connection
    > >> with your local one.
    > >>
    > >>
    > >> Did you set the appropriate read/write
    permissions on the
    > > directory(folder)
    > >> your database is in?
    > >> You can do that in GD's control panel.
    Hosting> Select your site >
    Manage
    > > to
    > >> open it.
    > >>
    > >> I hope this helps.
    > >>
    > >> For what it's worth, I only use GD for domain
    names now.
    > >> I had numerous problems with some sites hosted
    there, switched them to
    > >> HostMySite and haven't had any.
    > >>
    > >> Take care,
    > >> Tim
    > >>
    > >>
    > >>
    > >>
    > >>
    > >> "Baxter" <baxter(RemoveThe
    :-)@gtlakes.com> wrote in message
    > >> news:[email protected]...
    > >> > Baxter - I get "Connection was Made
    Successfully" if connection to
    the
    > >> > database was made Successfully not sure
    what's going on here? When
    you
    > >> > look
    > >> > at your site files in Dreamwerer on the
    server is there a folder
    named
    > >> > access_db? If so is your data base in that
    folder? The database needs
    > >> > permissions set to read and write to that
    file. Have you checked
    > >> > permissions
    > >> > on the site? does GD give you a control
    panel so that you can set the
    > >> > permissions your self? I have never used
    GD but have seen where
    people
    > >> > have
    > >> > had lots of problems with them when using
    a scripting language. I
    don't
    > >> > know
    > >> > what else it could be at this point.
    > >> > Dave
    > >> > "mtrueblood"
    <[email protected]> wrote in message
    > >> > news:[email protected]...
    > >> >> Baxter - I get "Connection was Made
    Successfully" with the
    credentials
    > >> >> you
    > >> > gave
    > >> >> me. My site works just fine on my
    local machine with
    > > access_trueblood.dsn
    > >> > (it
    > >> >> also worked with the dsn I initally
    created for the site). All pages
    > >> > display
    > >> >> and I get no errors. I think where the
    issue may be, now I am
    guessing
    > >> > here, is
    > >> >> that my connection refrences a
    database located in the folder
    > >> >>
    C:\Users\Administrator\Websites\Sitename\access_db, but once I
    upload
    > > my
    > >> > site,
    > >> >> the database still sits in access_db,
    but the root folder possibly
    has
    > >> > changed
    > >> >> (maybe causing the connection to
    fail).
    > >> >>
    > >> >> Dooza - I don't understand how I can
    use "c:myDsnFile.dsn", when
    once
    > > I
    > >> > upload
    > >> >> my site, "c:myDsnFile.dsn" would then
    not be the location of my dsn.
    > >> >> "c:myDsnFile.dsn" refrences a file on
    my computer. I am using an
    > >> >> online
    > >> > hosting
    > >> >> company. Am I not understanding you
    correctly? See note above. I did
    > > use
    > >> > your
    > >> >> information and got the following
    browser error:
    > >> >>
    > >> >> Microsoft OLE DB Provider for ODBC
    Drivers error '80004005'
    > >> >> General error: Invalid file dsn ''
    > >> >> /sitename/contactus/index.asp, line
    130
    > >> >>
    > >> >> line 130 -
    rs_contactus.ActiveConnection = MM_connTrueblood_STRING
    > >> >>
    > >> >> I am researching on how to do a
    dsn-less connection, unless I can
    get
    > >> > this
    > >> >> figured out.
    > >> >>
    > >> >> Thanks - Matt
    > >> >>
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    >
    >

  • I am new with JAR files please help me

    Hi Dear All,
    I am new with JAR files, I know concept, but dont know how to careate JAR, and how do i use it?
    Please help me.
    Thanks

    This tutorial covers that:
    http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

  • Help using jar file!

    Help using jar file!
    Hello
    I have created a jar file by using
    jar cvmf Manifest.txt myjar.jar 1.class Mydirectory
    In 1.java file :I have used
    JEditorPane editor;
    editor.setPage(getClass().getResource("/Mydirectory/default.htm"));
    If I am only giving myjar.jar file to the client without Mydirectory then also it is working fine by showing default.htm in JeditorPane.
    But my problem is I want to use
    Runtime.getRuntime().exec("cmd /c start IEXPLORE"+targetstr) ;
    targetstr will be the filename with path of the default.htm
    If I am giving myjar.jar file with Mydirectory to the client it is working but I don't want to give Mydirectory to the client .
    What should I do?
    Is there any solution for this?
    Using another jar file which will include mydirectory can solve this problem?
    Is there any othe concept in java so that I wll be able to hide Mydirectory from client?
    Please help.

    It seems like you could extract the .htm file from the jar, either with Runtime.exec or using the Jar API classes.

  • Can some help with CR2 files ,Ican`t see CR2 files in adobe bridge

    can some help with CR2 files ,I can`t see CR2 files in adobe bridge when I open Adobe Photoshop cs5- help- about plugins- no camera raw plugins. When i go Edit- preference and click on camera raw  shows message that Adobe camera raw plugin cannot be found

    That's strage. Seems that the Camera Raw.8bi file has been moved to different location or has gone corrupt. By any chance did you try to move the camera raw plugin to a custom location?
    Go To "C:\Program Files (x86)\Common Files\Adobe\Plug-Ins\CS5\File Formats" and look for Camera Raw.8bi file.
    If you have that file there, try to download the updated camera raw plugin from the below location.
    http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5371&fileID=5001
    In case  you ae not able to locate the Camera Raw.8bi file on the above location, then i think you need to re-install PS CS5.
    [Moving the discussion to Photoshop General Discussions Forum]

  • Help with add file name problem with Photoshop CS4

    Frustrating problem: Help with add file name problem with Photoshop CS4. What happens is this. When I am in PS CS4 or CS3 and run the following script it runs fine. When I am in Bridge and go to tools/photoshop/batch and run the same script it runs until it wants interaction with preference.rulerunits. How do I get it to quit doing this so I can run in batch mode? Any help is appreciated. HLower
    Script follows:
    // this script is another variation of the script addTimeStamp.js that is installed with PS7
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.INCHES;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "Lower© ";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = " ";
    // Set font size in Points
    myTextRef.size = 10;
    //Set font - use GetFontName.jsx to get exact name
    myTextRef.font = "Arial";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 0;
    newColor.rgb.green = 0;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 10, 99);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    you might want to try the scripting forum howard:
    http://www.adobeforums.com/webx?13@@.ef7f2cb

  • How to use javap with jar files ?

    how to use javap with jar files ?
    thanks

    As long as the jar is on the class path, your gold. So,
    javap -classpath myjar.jar mypackage.MyClass
    Chuck

Maybe you are looking for