Including extensions in my application JAR
Hi. I have an application in a JAR-file the uses some extension classes also found in a JAR-file. To run my application I have to put the extension JAR-file in ...\JavaSoft\JRE\1.3.1\lib\ext\.
I would like to be able to distribute my application in a single JAR-file. Can this be done by for example including the extension JAR in my application JAR? (And how?)
Help appreciated, thanks!
i have a similar problems to this one
1)
problem is ... i jus downloaded JRE 1.4.2 .. i also have JRE 1.4.1_03 .. when i select JRE 1.4.2 .. it doesnt download the required requird JAR file no popup is shown the applet loads succesfully but obviously doest run becoz the requird JAR file was not installed. but when i use the older JRE 1.4.1_03 it shows the popup for download and installs the JAR file in the lib/ext .. can n e one help me on this?
2) another prblem is after downloading the JAR in JRE 1.4.1_03 ..
i have an applet that uses another JAR file that is of about 1.5 MB ... i want it to get this JAR installed on the client when the client first time access the WebPage
the problem is that it downloads the first time and get installed and runs fine but when i refresh the page or visit the site again .. it downloads again so its useless i jus want it to download once
i guess theres sum setting in the mansifest file or sumthin ??
n e help in this regard wud be much appriciated
faraz!
Similar Messages
-
Deploying EJBs with same name in different application jars on JBOSS
Hi,
We are attempting to deploy entity beans with the same name in 2 different EJB application jars on jboss 3.2.5. One bean is an extension of the other, so some of the DB columns they refer to are the same (they access different DB tables in different tablespaces). However, the field names corresponding to these DB columns in the beans themselves are different (i.e. DB column serviceid is associated with the field serviceid in one bean and service_id in the other).
We have altered jboss.xml for one of the EJB applications so that the jndi-name used to access that application's bean is different to the jndi-name used to access the entity bean in the other EJB jar.
However, when we attempt to deploy both jar files on the same jboss server, one of the applications deploys successfully and when we deploy the other, we get EJB spec violation errors, such as the following:
14:18:34,631 WARN [verifier] EJB spec violation:
Bean : CommunityAddress
Section: 10.6.2
Warning: The entity bean class must define a get accessor for each CMP field.
Info : Field: service_id
I'm presuming that this is because the bean which references the serviceid DB column with a field called serviceid is being mixed up with the other bean, which has a service_id field.
Can anyone tell me if there is anything else that is required to get entity beans/EJBs in different applications but with the same names (and some overlapping fields, etc) deployed successfully on the same jboss server apart from editing jboss.xml for one of the applications?
Is this a jbosscmp-jdbc.xml issue?
Any help much appreciated,
MauriceHi Srinath
Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
Regards
Raj -
Java -jar application.jar not finding file?
I have an application program that contains the
following two lines of code:
FileInputStream sf = new FileInputStream "CustomWorld.ini");
settings.load(sf);
and when I run it as:
java application
it runs fine but if I run it as:
java -jar -classpath .;application.jar application.jar
it can't find the "CustomWorld.ini" file. Why is that
and how can I fix it?
Many thanks for your help.
PS: to create the jar file I used:
jar -cvfm application.jar application.mf application.class CustomWorld.iniOnce your CustomWorld.ini file is in the jar, you can no longer access it directly with a FileReader. JDK 1.1 included resource locators to java.lang.Class...
URL url = application.class.getResource("/CustomWorld.ini");
if (url != null) { // resource was found
InputStream in = url.openStream();
settings.load(in);
} else {
// fail gracefully or use defaults
}Note that the CustomWorld.ini file will need to be in the classpath or the root folder of the jar file for this to work.
Regards,
-Troy -
Accessing web application JAR files from applet
I've got an applet which is part of a web application.
All the web application JARs are in the webapps/myappl/WEB-INF/lib directory, and I
can't seem to place anything in that directory on the archive attribute of <OBJECT> tag.
I'm running into trouble because I'm sending objects from the servlet to the applet and keep getting classnot found during deserialization because I've missed some jar file on the archive attribute. I've had to copy lots of jar files up to where the codebase in the HTML file is to make this run. My question is this.
Is it better to just change the tomcat security policy file (catalina.policy in tomcat conf directory) so that the JARs are directly accessible and I don't have to copy them from WEB-INF/lib???? Has anyone done this before? What would the line look like?
I'm assuming that I have to follow the instructions (THAT I DON'T UNDERSTAND)
at the bottom of the policy file. Can someone help me out here????
should I have something like
grant codeBase "file:${catalina.home}/webapps/myappl/WEB-INF/classes/-"
{ permission java.security.AllPermission; };
grant codeBase "file:${catalina.home}/webapps/myappl/WEB-INF/lib/-"
{ permission java.security.AllPermission; };
Will this allow me to place references to jar files (and the classes directory) in the archive attribute, such as
<OBJECT ..... >
<param name="archive" value="../WEB-INF/lib/applet.jar,../WEB-INF/lib/someapp.jar,../WEB-INF/classes" />trailer for catalina.policy is
// You can assign additional permissions to particular web applications by
// adding additional "grant" entries here, based on the code base for that
// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
// Different permissions can be granted to JSP pages, classes loaded from
// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
// For instance, assume that the standard "examples" application
// included a JDBC driver that needed to establish a network connection to the
// corresponding database and used the scrape taglib to get the weather from
// the NOAA web server. You might create a "grant" entries like this:
// The permissions granted to the context root directory apply to JSP pages.
// grant codeBase "file:${catalina.home}/webapps/examples/-" {
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// The permissions granted to the context WEB-INF/classes directory
// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
// The permission granted to your JDBC driver
// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar" {
// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// The permission granted to the scrape taglib
// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar" {
// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };Thank you for your reply.
As I mentioned in my first post I had seen a couple of posts mentioning ServletContext before, but dismissed them as I am not using any servlets of my own. However, since you showed me exactly how it was used I realised I could probably just use a dummy servlet to get this information.
The following page suggests a couple of techniques for doing just this.
http://www.jguru.com/forums/view.jsp?EID=1087411
So I think that's me sorted, cheers. -
Netbeans 551: Include all libs in project jar file. Possible?
Is it possible to manually, or automaticly, include the /dist/lib directory into my "GonioLabt,jar" to make it more 'stand alone', file wise.
Netbeans generates this dist/README.TXT
========================
BUILD OUTPUT DESCRIPTION
========================
When you build an Java application project that has a main class, the IDE
automatically copies all of the JAR
files on the projects classpath to your projects dist/lib folder. The IDE
also adds each of the JAR files to the Class-Path element in the application
JAR files manifest file (MANIFEST.MF).
To run the project from the command line, go to the dist folder and
type the following:
java -jar "GonioLab.jar"
To distribute this project, zip up the dist folder (including the lib folder)
and distribute the ZIP file.
Notes:
* If two JAR files on the project classpath have the same name, only the first
JAR file is copied to the lib folder.
* If the classpath contains a folder of classes or resources, none of the
classpath elements are copied to the dist folder.
* If a library on the projects classpath also has a Class-Path element
specified in the manifest,the content of the Class-Path element has to be on
the projects runtime path.
* To set a main class in a standard Java project, right-click the project node
in the Projects window and choose Properties. Then click Run and enter the
class name in the Main Class field. Alternatively, you can manually type the
class name in the manifest Main-Class element.Yes it is possible. The same question has been
killing me all day. Here is how I did it.
(I'm on Mac OS 10.4, but this should work anywhere)
Netbeans produces the following:
dist/myJar.jar
dist/lib/swing-layout-1.0.jar
I would prefer to have only:
dist/myJar.jar
But, as you know, myJar.jar requires the class files
stored in swing-layout-1.0.jar. I unpacked the jar
files and examined the manifest files. Here is how to
unpack and repack the jar files into a single jar
file:
First, I renamed myJar.jar to myJar.zip and let OS X
unarchive the jar for me. I did the same for
swing-layout-1.0.jar.
I then dropped the MANIFEST.MF file from
MyJar/META-INF/ into a new folder on my harddrive
Then, I dropped the package (its a folder full of
class files) from MyJar/ into the same new folder on
my harddrive.
At this point, the new folder contains:
/newFolder/MANIFEST.MF
/newFolder/myPackage/
Then, I grabbed /dist/lib/swing-layout-1.0/org/ and
dropped that into the new folder.
We now have in the new folder:
/newFolder/MANIFEST.MF
/newFolder/myPackage/
/newFolder/org/
Almost done:
Open the MANIFEST.MF file with a text editor. Mine
looked like this:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_07-87 ("Apple Computer, Inc.")
Main-Class: ohm.GUI
Class-Path: lib/swing-layout-1.0.jar
X-COMMENT: Main-Class will be added automatically by
build
I replaced the ENTIRE contents of the file with
this:
Manifest-Version: 1.0
Main-Class: myPackage/Main
Where 'myPackage' is the folder containing my class
files, and 'Main' is the class containing the
'main(String[] args) method.
Save the file and we're ready to repack the archive.
Open the command line (in OS X this is the Terminal)
I assume the syntax is the same in windoze; Navigate
to the new folder you created.
In OSX: cd /newFolder
in windoze: cd \newFolder
Then use java's jar command:
jar cmf MANIFEST.MF MyJar.jar *
What this does:
jar is the command. cmf are flags: the 'c' is for
creating a new jar archive, the 'm' is to specify a
premade manifest file, the 'f' tells jar to write the
results to a file. MyJar.jar is the name you have
chosen for the resulting .jar file. the '*' is a
wildcard character that tells jar to put every file
in the present working directory into the new .jar
Thats it! This produced myJar.jar which worked fine
by itself, as it included all the classes from
swing-layout-1.0.jar. It would be a trivial matter to
write a shell script to do all this for you, unless
of course you use something silly like windows, in
which case you'll have to write a batch file or use
python or something. Good luck, I hope this saves
others time, drop me a e-mail if this was at all
confusing! [email protected]
You should be aware that doing this may well violate the licensing terms for third-party libraries
By the way, what's silly about using Windows? Are you saying you don't develop for Windows because it's "silly"? -
Static initialization of java code included in the Imported Archives jars?
Hi
Does SAP PI 7.0 support static initialization of java code included in the Imported Archives jars?
Static block of a java class included in the Imported Archive jars throws a Runtime Exception called ExceptionInInitializationError while trying to run.
Regards,
RDSHave you tested the code outside PI?
-
Application jar file is corrupt
Hi Everyone,
Having written a very simple application using ME software develeopement kit, when ran the emulator prompts me to either INSTALL APPLICATION or MANAGE CERTIFICATE AURTHORITIES.
If INSTALL APPLICATION is selected I'm then prompted to ENTER A WEBSITE TO INSTALL FROM into a textbox. MANAGE CERTIFICATE AURTHORITIES presents some spurious code and I don't know what it means. However when ran for the first time, everything seemed to go swimmingly untill I was informe of (I Think) 'Application jar file is corrupt' and then subsequently as described above.
I don't know a great deel about computers, but looks to me like a random problem requiring a random solution - very frustrating! If anyone would like to help I'd be very greatful indeed.
Jamespavanpotru, welcome to the forum. Please don't post in threads that are long dead. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
I'm locking this thread now.
db -
"Include file in PC application" Error
Hi All,
"Include file in PC application" Try again -
Error is coming while attaching a document to FI Invooice.
Please suggest,
Regards.
<Moderator note: Subject edited. Uo not use 'Urgent'. See the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for further info.>
Edited by: Mike Pokraka on Jul 8, 2008 8:39 PMregarding the authoriazations and objects for GOS (Generic Object Services), SAP has done a lot of development over the last year. As GOS is spreading in applications it's complexity grows, so please go to:
service.sap.com/notes with keywords 'GOS' 'authority' or 'Generic Object Service authority' or a variant of those. you will find several dozen notes concerning this matter. -
Re-download application jars from server issue
hello,
i have a "little" problem: by every start of an application the WebStart loads all the application jars from the server again. (only Vista version affected) Can anybody help please?
Thank you,
Eugen CojocaruI guess you're not using explicit versioning (that should solve it).
Are you using the JnlpDownloadServlet or one of your own?
Are you sure it's a Vista problem?
Did you check PC time and server time?
Did you check you're receiving 'If-Modified-Since' header server-side? -
Water was accidentally poured on my computer and it was completely ruined, I lost everything I had including all of my applications.I have now purchased a new computer and would like to redownload the copy of Photoshop Elements that I purchased last year can I do this? How can I do this? And for crying out loud how do you get to talk directly to a customer service representative?
Which version of photoshop elements and operating system?
Perhaps one of these is it:
(under Downloads for older versions)
Download and Installation Help -
The application "Jar Launcher" can't be opened
When I am open a Jar file, it aways say: The application "Jar Launcher" can't be opened, then it says: "-1712" I am using the most update Java. I am also using Marvelicks OSX 10.9.5. My computer doesn't have a lot of issues. May someone help me?
Restart the computer and try again.
-
How to disable application jar creation in tmp folder
Hi
I am deploying an application on clustered server.
Everytime i deploy application a jar(for the application) is getting created in admin server's tmp folder in the folder WLTEMP_APP_DOWNLOADS/<application_name>/<application_name.jar>
I am deploying application in exploded format and one of its functionality is to generate csv files.
As Weblogic seems to be referring the application_name.jar I get a 404 error whenever csv files are accessed in UI.
Could somebody please suggest the settings to disable the application jar creation.The issue was with weblogic caching.
The server was creating a jar of the application in a tmp folder for every deployment .
Due to this any new file generated within deployment path was not being identified.
Disabling caching on admin server resolved the issue. -
Error - " Include file in PC application " when attaching in VA02
Hi all
I am having a typical problem. All i am realising that it is some where related to authorization issue thats why i am posting the same in this forum.
When one user is trying to attach a document to a sales order thru transaction va02 the following is showing -
"Include file in PC application , try again ". If I run su53 it is reporting that last authorisation check sucessful at that time.
But if SAP_ALL is given to this user then no problem arise, which prompt me to think that there is something related to authorization.
Any idea?
Regards
Santanuregarding the authoriazations and objects for GOS (Generic Object Services), SAP has done a lot of development over the last year. As GOS is spreading in applications it's complexity grows, so please go to:
service.sap.com/notes with keywords 'GOS' 'authority' or 'Generic Object Service authority' or a variant of those. you will find several dozen notes concerning this matter. -
After replacing my hard disk(crushed) it didn't include iphoto in my application.i try to download for the 10.6.8 but it request a later version
After replacing my hard disk(crushed) it didn't include iphoto in my application
Bring it back to whoever replaced the Hard Disk. -
Error: Accessing the Reader Extensions Server web application for the first time
Hi,
I've followed the the installation guide line by line. Everything OK.
But when i access the Reader Extensions Server web application i see the following error:
An error has occured
Error 473: The credential permission settings could not be determined: 'com.adobe.document.pdf.CredentialLoginFailure: IDL:com/adobe/document/pdf/CredentialLoginFailure:1.0'.
Have you ever faced this kind of message before?
To tell you the truth i'm not very sure if my Rights Credential file is valid. But is this the cause of this message?
I use Form Server 6 and Reader Extensions 6 with a Websphere Application Server 6.0
Thanks in advanceHi Stelios,
Yes, it seems to me also, as a bad certificate issue.
If memory serves, I run into this message once, where the certificate was valid. Anyway, Websphere v6 is not a supported app server. Have you tried installing on v5.1?
You might want to read this post, too:
matt cockburn, "Fix for LiveCycle Reader Extensions 7.0 install error" #, 6 May 2005 8:22 am
If you are located in Greece, we may be able to help you. You may contact me "ekokkoris at anodos.gr", should you wish.
Regards,
Evangelos
Maybe you are looking for
-
How to Convert internal table data into text output and send mail in ABAP
Hi All, Good Morning. Taking a glance at a code that converts internal table data to an Excel file in ABAP. also checked how to send this excel to mailing list as attachment. But thought of doing it without excel. I mean, I have an internal table whi
-
Sync/Async brdige error in BPM
Hi, I am working on RFC-TO-Webservice scenario(Synchronous) and I am using the BPM in this scenario. In BPM just I have used 2 steps. Receive - Opened Sync/Async bridge Send - Synchrouns step Send - Cloase the Receive step Send - Asynchrous send s
-
Do you have to buy the Nike+ workouts?
Do you have to buy the nike+ workouts, or can you just use your own music with the voice still telling you your speed, etc.
-
I have been charged twice for a TXT £9.00 message to 64506. HELP
I have not used 64506 number. I have been charged £9.00 for sending 2 TXT t0 this number. Can any body tell me what is this number for?
-
Hi everyone, It would be great of you people if some could send the BW case studies you people have. Thanks in advance. Sekhar