Unable to run jar file without lib folder containing swing-layout-1.0.jar
I have done my project through NetBeans 5.0. Eventhough I have copied my lib foloder containing swing-layout-1.0.jar inside my project.jar, I am still unable to run my project.jar in other systems, it is creating an error as Could not find the main class. Program will exit. But if I copy the lib foloder containing swing-layout-1.0.jar in the same path as the project.jar, then my project.jar is running.
But I want to give only the project.jar for other users and not also lib foloder containing swing-layout-1.0.jar each time.
Could someone please help me with this.
When you develop GUI applications using the Netbeans you may endup using netbeans specific jar files in your auto generated code.
And when you build jar files with netbeans it copy the third party jar files used in a application in to a lib folder in the same directory as the jar file of your project. And then set a class path entry to those jar files in your project jar file's manifest file.
So if you want to redistribute the package you have to redistribute your jar file and every thing in the lib folder in with the same directory structure.
If you want to change the structure you will have to change the class path to suit the new structure.
Similar Messages
-
Its urgent how to use calss file of jar located in lib folder
how to use calss file of jar located in lib folder.
i want to use RowSetDynaClass class which is in beanutil jar file which is in my lib folder .if i use that class in my jsp following error is coming.
Class RowSetDynaClass not found.
RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
how to access class in jar file.
please helpYou have to either refer to the class in its fully quallified name, or import it into the JSP:
<%
some.full.packagename.RowSetDynaClass resultSet = new some.full.packagename.RowSetDynaClass(rs,false);
...-or-
<%@ page import="some.full.packagename.RowSetDynaClass" %>
<%
RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
...As long as the class has public visibility and you have re-started the server/servlet context since you added the JAR. -
[svn] 1985: use the asc.jar in the lib folder when running the asc tests
Revision: 1985
Author: [email protected]
Date: 2008-06-06 12:20:06 -0700 (Fri, 06 Jun 2008)
Log Message:
use the asc.jar in the lib folder when running the asc tests
Modified Paths:
flex/sdk/trunk/build.xmlYou may want to use the filtering classloader. See the doc at http://e-docs.bea.com/wls/docs92/programming/classloading.html#wp1097187
-
Loading jar files without extracting
Is it possible to load a jar file without extracting it? If so, how?
I've loaded the JCE and the class that I'm using references another jar file, which also comes with the JCE. I've loaded that other jar as well, but it's failing. It appears to be looking for the jar by it's name (US_export_policy.jar). I'm not sure how to get Oracle's JVM to see the other jar.
Thanks,
Kevin Ash
[email protected]On 10/28/10 11:13 PM, Tilak wrote:
> I use JDT API org.eclipse.jdt.internal.core.util.ClassFileReader to
> identify annotated POJOs, which doesn't provide functionality to
> identify a POJO as annotated if it's parent (interface) is already
> annotated.
If you're directly reading class files, you may have to navigate the
class hierarchy yourself, e.g., recursively find and open the parent
types to search for annotations.
If the annotation type you're looking for has
@Retention(RetentionType.RUNTIME) or @Retention(RetentionType.CLASS),
and if it has @Inherited, then the APT annotation processing API will
report a class as showing the annotation, if one of its superclasses is
annotated. Roughly the same is true of reading the class reflectively.
However, that does not apply to interfaces, only to superclasses. You
can read about that in the JDK docs [1].
I guess what I'm saying is that by the terms of Java, a POJO _is not_
annotated just because it implements an interface that happens to be
annotated. Therefore there is no direct way to ask a representation of
a class whether it is annotated in this way - rather, you have to walk
the supertype hierarchy and ask the individual interfaces whether they
have the annotation.
[1]
http://download.oracle.com/javase/1.5.0/docs/api/index.html? java/lang/annotation/Retention.html -
Unable to run batch files in my EP server
Hi,
I'am unable to run batch files(go.bat and configtool.bat) on my EP server.Anbody please give me a solution.
With Regards
Pradeep.BIf your EP Server is on non-windows based environment then you cannot use go.bat & configtool.bat or else you can. If you are trying to execute these on unix based machines then you have to use go.sh & configtool.sh files.
Pradeep -
I am unable to run flash files, I get an AIR error.
I get this Adobe AIR error: " This installation of this application is damaged. Try re-installing or contacting the publisher for assistance." I have reistalled AIR 3.3 and still am unable to run flash files.
Shah Shah wrote:
The idea is once my iPhone is paired with the MBP via bluetooth...
No it's not. Read the description of the application:
"Bluetooth: Tokenlock can monitor any Bluetooth device to check if it is removed from range, such as your cellphone or a headset. Token lock checks periodically based on a schedule you choose to see if the Bluetooth device can still be seen. You can set different schedules based on whether or not your computer is plugged into power or is simply on battery to conserve battery power. The device does not have to be paired with your computer, allowing you to use just about any Bluetooth device - not just those that the computer supports." -
Unable to run batch file through BO XI 3.1 server
IHi,
I am unable to run batch file (.bat) from BO XI CMC. the batch file is running fine through command prompt but fails at server. Error msg is "Running this type of program is disabled by your administrator".
Can you help?
Thanks in advance,
AvijitHave your administrator enabled the running of that type of program in the CMC?
Sincerely,
Ted Ueda -
Jars files inside atglib folder
HI Guys
I am creating ear file in atg by using ant script ,inside ear file i found atglib files with some jar files different files
from where it is picking those jar files inside atglib folder
please give me clear picture on thisHI David,
Will it follow config path layering while build the ear file ?
or do we need to provide explicitly each module to build?
in my application i didnot find some ootb modules in build script but inside ear file those modules jar files are i am able to see
how it is possible ? is it because of config path layering? -
How to get list of jar files loaded by servlet container.
Hi,
I need to display in my servlet program about the list of jar files loaded by servlet container. Does it vary for each servlet container or is it same. Where can I get those details.
I need to write code to support tomcat 4x, iplanet 5.0 and websphere 6.0.
Thanks & Regards,
Nasrin.NFor curious, here are output prints for all 3 methods:
1) parsing system property
2) tschodt
3) overcast SystemClassLoader to URLClassLoader
/home/espinosa/workspace/jboss_embedded_test1/target/test-classes
/home/espinosa/workspace/jboss_embedded_test1/target/classes
/opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
/opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
/opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
package com.sun.org.apache.xerces.internal.impl.validation, Java Platform API Specification, version 1.6
package com.thoughtworks.qdox.directorywalker
package com.sun.org.apache.xerces.internal.parsers, Java Platform API Specification, version 1.6
package java.util.jar, Java Platform API Specification, version 1.6
package org.testng.internal.thread
package com.sun.org.apache.xerces.internal.util, Java Platform API Specification, version 1.6
package java.net, Java Platform API Specification, version 1.6
package sun.reflect.misc, Java Platform API Specification, version 1.6
package esp.ejb.samples1.test
package sun.security.provider, Java Platform API Specification, version 1.
file:/home/espinosa/workspace/jboss_embedded_test1/target/test-classes/
file:/home/espinosa/workspace/jboss_embedded_test1/target/classes/
file:/opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
file:/opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
file:/opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
...Interestingly, method 1 and 3 gives the same list, same order, same count, just format of item is a little bit different. The order is same as in Eclipse .classpath file.
Method 2 (tschodt) give significantly more items! rougly 3x! Different order (somewhat random it seems to me). Some items contain extra information, like version and string "Java Platform API Specification".
It prints not absolute paths but logical Java names. -
Updating a running JAR file without using JDK
Hi guys, I have been stuck on this problem for days. I have a program that allows the user to log in and encrypt/decrypt files. This program must be stored on the removable drive and it should work on any operating system without requiring any installation of files. In order to store their login data, I wrote it to a shadow.txt file. My idea was to pack this shadow file into the JAR file so as not to create unnecessary files. I understand that in order to update JAR files, all I need to do is to do
Runtime.getRuntime().exec("jar uf login.jar shadow.txt");However, here's the problem. I cannot assume that every user PC has JDK installed. As JRE doesn't have jar.exe, that command won't work anymore. Furthermore, the JAR is currently in use. So even if the user has JDK, windows will never allow this command to go through. Anyone has any ideas?I had similar requirement, except that, i used a war file.
Had a client.war file in JBoss deploy directory, and i needed to update client.jnlp file present in it.
But as jar.exe comes only with jdk, could not use jar -uf command.
But not sure if it works with other application server too,
in jboss we can explode the war file, meaning we can create a directory "client.war" in deploy directory and extract your client.war contents to it. Now when server starts, it considers the extracted directory as web archive application.
This extraction can be done with out using jar.exe. can be done using jarinputstream aswell.
Once the contents are extracted , the files in it can be modified with out jar.exe.
For my case it worked as my client.war file is not signed, although the resources inside are signed. -
What is directory where I can put in jar file without specify classpath ?
hi,
Is there any directory in weblogic similar to the directory of WEB-INF/lib/ where I can throw a jar file in without specify classpath explicitly.
The reason I'm looking for such directory is :
-- I do not want to specify classpath explicitly
-- I'd like it outside of an application so that it stay even if the application redeployed.
ThanksHi Aacc,
The domain library directory that you are looking for is usually $DOMAIN_DIR/lib, for example "C:\Oracle\WLS_Middleware10.3.4\user_projects\domains\test_domain_1\lib" (Windows) or "/u01/weblogic/domains/my_domain/lib" (Linux/Unix).
The jars located in this directory will be picked up and added dynamically to the end of the server classpath at server startup. The jars will be ordered lexically in the classpath. The domain library directory is one mechanism that can be used for adding application libraries to the server classpath.
You can override the $DOMAIN_DIR/lib directory using the -Dweblogic.ext.dirs system property during startup. This property specifies a list of directories to pick up jars from and dynamically append to the end of the server classpath using java.io.File.pathSeparator as the delimiter between path entries.
-Cris -
Hai Sir,
I am facing one problme in weblogic8.1 while depolying the .EAR FILE.
Please help me sir.
Case1) 1) I am using the struts and log4j frameworks and 3rd party jar files with
weblogic8.1.
2) I make the ejbs,webapplications and 3rdparty jar files, ear file the following
dir structure .And i mentioned the Class-path including all jar files in the MANIFEST
OF EAR FILE.
While deploying the ear file it is giving following error.If log4j.jar does not
mention in the Weblogic script file
java.lang.NoClassDefFoundError: org/apache/log4j/Priority
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:1494)
at java.lang.Class.getDeclaredFields(Class.java:1073)
at weblogic.ejb20.deployer.EJBModule.disableImplClassLoader(EJBModule.java:1082)
at weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassDependencies(EJBModule.jav
a:982)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:419)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.j
ava:2792)
at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.
java:1478)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:11
36)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:97
5)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareCon
tainer(SlaveDeployer.java:2571)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(Sla
veDeployer.java:2523)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeploy
er.java:2453)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer
.java:820)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:
536)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java
:494)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:
25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
Please provide the soluation without mentioning classpath in the weblogic script
.How to make the EAR file incliding ejbjar,webapplication and 3rd party jar files.
Thanks & Regards,
ASHOK SAMRAT
[email protected]Refer to the section
Handling Utility classes
http://dev2dev.bea.com/products/wlserver/articles/musser.jsp
thanks,
Deepak
"Ashok Samrat" <[email protected]> wrote:
>
Hai Sir,
I am facing one problme in weblogic8.1 while depolying the .EAR FILE.
Please help me sir.
Case1) 1) I am using the struts and log4j frameworks and 3rd party jar
files with
weblogic8.1.
2) I make the ejbs,webapplications and 3rdparty jar files, ear file
the following
dir structure .And i mentioned the Class-path including all jar files
in the MANIFEST
OF EAR FILE.
While deploying the ear file it is giving following error.If log4j.jar
does not
mention in the Weblogic script file
java.lang.NoClassDefFoundError: org/apache/log4j/Priority
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:1494)
at java.lang.Class.getDeclaredFields(Class.java:1073)
at weblogic.ejb20.deployer.EJBModule.disableImplClassLoader(EJBModule.java:1082)
at weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassDependencies(EJBModule.jav
a:982)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:419)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.j
ava:2792)
at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.
java:1478)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:11
36)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:97
5)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareCon
tainer(SlaveDeployer.java:2571)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(Sla
veDeployer.java:2523)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeploy
er.java:2453)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer
.java:820)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:
536)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java
:494)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:
25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
Please provide the soluation without mentioning classpath in the weblogic
script
How to make the EAR file incliding ejbjar,webapplication and 3rd party
jar files.
Thanks & Regards,
ASHOK SAMRAT
[email protected] -
Unable to save Photoshop files in original folder: file disappears
Hi,
At random moments when I'm saving layered Photoshop CS5 files, a message pops up with the following text:
Could not save "\...\FileName..." because the file is locked or you do not have the necessary access privileges. Use the 'Properties' command in the Windows Explorer to unlock the file.
Well the strange thing is that I'm the administrator, the only user of this PC and even when I set/check the properties of the folder containing the files this continues to happen. What is even more disturbing is that I have to save my file as a new file in a new location and when I check the original file, it is no longer in it's original folder.
I save all my files to the local HD and I use an external device to backup my files. I regularly get notices on my backup device telling me that various files were deleted, but will be kept until I need the room. These are files which I did not delete, they are files which I'm still working on.
I'm having to save to the original job folder first, save to the desktop when I get the notice saying I can't save, and then save back into the original folder when I can't save on the desktop anymore because of the same error message. I sometimes get a similar Adobe error message which is basically along the same lines, but I haven't noted the exact text yet.
Recently I closed a file which I had saved and when I needed to return to it, it was nowhere on my computer. I'm very organised about file saving, so it's not a matter of saving files in the wrong place.
I no longer run my back up continuously while I'm working because while it's great to have the peace of mind that I'm regularly backed up, my files can get up to 2GB in size and I think the backup running at the same time is slowing Photoshop processes down, so I most often pause it until I take a break. On this occasion, I had been running it while working (smaller file) and so I was able to retrieve an earlier version from my backup which saved me from having to re-do the job completely. I didn't get this problem when I was using CS5 on Vista, it's been since I've been using Windows7 and my back up drive.
I only recall having had this problem with PSDs, but that could just be because these files can take up to ten hours to complete and there's a higher chance of getting an error message over a longer period of time.
It doesn't happen very often by there has been the very rare occasion where two versions of exactly the same file have been visible in the original job folder (same name on both files). To check if files are where they're supposed to be or if they seem to exhist, I have to close the job folder and re-open it.
I'll disconnect my back up drive while I'm working and see how it goes. It's not ideal, but probably worth a try.
I don't know if there's a connection, but occasionally windows randomly sticks a lock on zipped folders which I create, regardless of the permissions I apply to the upper level folder they sit in. I'm told by a friend that it won't affect other people accessing these zipped folders from other machines. I don't know if that's the case, I always change the zipped folder's permission to include 'Users' and that makes the lock disappear.
I will run this file disappearance thing by Microsoft, but I thought I'd run it buy you guys first in case you can shed any light on it.
Meanwhile here are my specs. If you have any suggestions on how I can boost my computer's performance for large format print work in Photoshop I'd be happy to know. It's not bad now, but faster is always more pleasant:
DELL XPS 730X
Total amount of system memory 6.00 GB RAM
System type 64-bit operating system
Number of processor cores 4
Processor: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
Memory: (RAM) 6.00 GB
Graphics: NVIDIA GeForce 9800 GT
Gaming graphics: 3323 MB Total available graphics memory
Primary hard disk: 302GB Free (451GB Total)
Single hard disc, no partitions.
Adobe Creative Suite 5 Design Premium.
Thank you,
CharlieA great first chapter Charlie. Can't wait for the rest of the book.
The only time I've had anything like this happen, was in a new build after hooking the drives from the old system, but the permissions really were screwed up, and it was a straight forward fix. Is the machine networked perhaps? The files open in another app? I expect you answered this already somewhere in your forum equivalent of War & Peace. ;-) The lads on the Premiere Pro hardware forum can be disparaging about Dell and HP machines, saying their proprietary hardware and software are inaccessible, so I wonder if it is something along those lines.
I’d definitely unhook the second drive as a starting point, or at least double/treble check its permissions.
The only other thing I can think of is changing the state of ‘Save as to original folder’ in Preferences > file handling, but this is all very tenuous and straw clutching. -
How to get the jar file without knowing its name and any class inside it?
Hello, everybody!
I would like to know if there's a way to get a reference programatically to the initial jar without knowing its name and any class contained in it. By "initial jar" I mean the jar that was called in the prompt, like this:
java -jar jarfile.jaror in another way, in a graphical system. To be sincere what I really want is to get a reference to the jar's manifest, but I know if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also help. So, is there a way to do this?
Thank you.
Marcosjverd wrote:
marcos_aps wrote:
abillconsl wrote:
Can you be more specific - IOW, can you cite a specific case?Absolutely. I want to access the jar in source code with the java.util.zip.JarFile class, for example.But why? You still haven't provided a use case or explained what you're trying to accomplish. As already pointed out, whatever you're trying to do, this is a brittle solution. If you explain what you're trying to accomplish with this, somebody may be able to suggest a better approach.jverd, I explained for baftos. Anyway, I will try to be more specific. I start my sytem like this, from, say, for example, jar1.jar:
import br.product.System;
public static void main(String[] args)
System.start("NameOfTheSystem");
}The System class is in util.jar, for example. This jar is used by all systems. I wouldn't like to pass in the name of the system, as above. I would like that the System class could read it from jar1.jar's manifest file. I just would like to have this:
import br.product.System;
public static void main(String[] args)
System.start();
}It is more elegant and I don't have the name of the system in two places: code and manifest file.
Marcos -
How to extract jar files into a folder in the local disk and then import?
hai forum,
will any one tell me how should i extract jar files into a location in my project folder and then how to import the class files for further usage?
Thank you .I will be graeateful if u could explain this a bit.
Do you want to say that i should craete instance of
ZipEntry like this
InputStream is =
jarFile.getInputStream(entry);
File inputFile = new
File("C:\\myclasses.data");
FileInputStream fis=
new FileInputStream(inputFile);No! You need to write the entry using FileOutputStream copying all the bytes of the ZipEntry InputStream to the FileOutputStream.
>
What about adding into a directory?Do i have to
create on dynamically?Yes! You can use File.mkdirs(). For example
File ofile = new File("your directory where you will place the zip entries" + zipEntry.getName());
ofile.getParentFile().mkdirs();
Maybe you are looking for
-
Separating two iTunes accounts on the same computer
I just got an iPad, and my son has all of his iTunes stuff on my computer. How do I keep our music separate?
-
Revision: 3722 Author: [email protected] Date: 2008-10-17 14:04:59 -0700 (Fri, 17 Oct 2008) Log Message: Bug: BLZ-260 - Error message for a legacy <=3.0 client poll failing against a >=3.1 server is unclear QA: Yes Doc: No Ticket Links: http://bugs.a
-
Invoking ODI scenario from BPEL using Asynchronous callbacks
It has been given in many sites that for invoking an odi scenario, odi-public-ws.aar must be uploaded to AXIS2 framework as the web service uses AXIS2 as the web service container. For doing this first the AXIS2 should be deployed in OC4J. I am worki
-
Airport extreme icon not showing up in my devices
the whole thing was working just fine last week .i dont really want to restart it all from scrach .my wireless internet is working fine being routed through it but when i look in my hard drive and under devices i cant make the icon show up along with
-
I don't have a CD/DVD player
hello, I've got a new Ipod shuffle so I have to install the CD before connecting the Ipod but my CD/DVD player does not work out. How can I do? Downloads? (which one precisely?)Something else? Thank you very much for your help