Applet jar creation
I am creating a web application, and the server side objects are fairly simple to create with the NDS.
Now I want to create some applets and create the JAR for deployment within my web application. To add, the applet passes objects back and fourth to the server, so my web application will need to be aware of the classes in the applet application.
How do I do this within NDS?
hi nathan,
first thing add your applet jar file in the java build path of your project.
while accessing the method at runtime of these jar file pass the required objects.
regards,
guru
Similar Messages
-
BigIP F5 : changing IP leads to cache invalidated and redownload of applet jars
Hello all,
In short, I'm trying to figure out how to have the java 7 plugin not considering the server IP to decide whether to use cached version of our applet's signed jars.
As suggested in the title, we use BigIP's F5 boxes to dispatch requests among actual servers, which are located in 2 different sites (disaster recovery purposes).
Each site has an F5 box ; and our DNS resolve the application's host name by alternating between 2 different IPs : one for site 1, the other for site 2.
Each time a user visits http://theapp.mycompany.com, the host is resolved as 9.9.9.1 or 9.9.9.2, more or less randomly.
This works very nicely as long as the applet is not concerned, or bandwith and latency is good enough to absorb 1.5Mb in a snap.
For remote subsidiaries (10.000km away from servers), downloading 1.5Mb takes 35s -- too much for the normal user to wait.
And the problem is : the plugin insists on looking up the server IP each time it starts up, and ignores cache entries that have been downloaded from a different IP.
Here is the use case :
- user connects to http://theapp.mycompany.com ; the browser get an IP, doesn't matter which ; user logs on, navigates in the app's html pages -- no problem
- user gets to the applet :
- the html page says
<applet id="myApplet">
<param name="archive" value="a.jar,b.jar,c.jar,d.jar,e.jar"/>
<param name="codebase_lookup" value="false"/>
<param name="archive_1" value="a.jar, preload, version=7.5.7" />
<param name="archive_2" value="b.jar, preload, version=7.5.7" />
<param name="archive_3" value="c.jar, preload, version=7.5.7" />
<param name="archive_4" value="d.jar, preload, version=7.5.7" />
<param name="archive_5" value="e.jar, preload, version=7.5.7" />
<param name="baseUrl" value="/"/>
<param name="code" value="a/package/for/Applet.class"/>
<param name="mayscript" value="mayscript"/>
<param name="codebase" value="/applet/"/>
<param name="name" value="MyApplet" />"
<param name="locale" value="fr"/>
</applet>
The archive_n parameters are here in an attempt to tell the plugin to not even ask for jars if its cache contains entries with same host/same name/same version.
The version is assigned at build time at an application level ; it has nothing to do with the Implementation-Version attribute found in MANIFEST.MF files.
- Java and the plugin sarts up : let's assume this is the first time : cache is empty : all jars are downloaded ; as they are signed and the CA certificate chain was set in the browser config, and the java.policy is also configured to allow smooth exec, the applet runs smoothly -- after a long startup delay
- user leaves the applet, do some stuff in other applet-less pages for some minutes (the java/plugin processes are shut down after a minute or so)
- user reenters the page that contains the applet
- Java and the plugin start up again :
- the cache has entries for each jar : host, name, version are all ok.
- But : the jars are not seen as "prevalidated" ; heres' the applet log ( in French, translation provided after "//") :
network: Vérification de version pour a.jar. La version spécifiée est 7.5.7 //Checking version for a.jar. Specified version is 7.5.7
security: La vérification de révocation de la liste noire est activée // Check of blacklist revocation is activated
security: blacklist: created: NEED_LOAD, lastModified: 1378474147992
security: blacklist: hasBeenModifiedSince 1380806409906 (we have 1378474147992)
security: La vérification de liste de bibliothèques sécurisées est activée // Check of trusted libraries is activated
..... same for the other jars ....
network: Created version ID: 7.5.7
network: Created version ID: 7.5.7
network: Entrée de cache trouvée [URL : http://theapp.mycompany.com/applet/a.jar, version : 7.5.7] prevalidated=false/0 //Cache entry found
cache: Adding MemoryCache entry: http://sandbox-mosaic.jcdecaux.com/applet/plannerApplet_7.5.7.jar
network: Created version ID: 7.5.7
- The plugin then tries to lookup the host IP to check whether it matches that seen when creating the entry
- 2 possibilities here :
- the IP returned is the same : the plugin is happy, uses the cached jar, no question/download to/from the server, and the applet starts up quick and runs ok
- the IP returned is not the same ; the plugin says :
network: Vérification de version pour a.jar. La version spécifiée est 7.5.7 //Checking version for a.jar. Specified version is 7.5.
security: blacklist: created: NEED_LOAD, lastModified: 1378474147992
security: blacklist: hasBeenModifiedSince 1380806409906 (we have 1378474147992)
security: La vérification de liste de bibliothèques sécurisées est activée // Check of trusted libraries is activated
cache: CacheEntry IP mismatch: 9.9.9.1 != 9.9.9.2
and then it downloads again the jar.
Of course, all the jars are treated the same way.
Note that the applet eventually runs normally ; the only problem is that the cache essentially doesn't work, causing terribly annoying 35s delays at applet startup.
Interestingly enough, examining the jdk 6 code shows that the "prevalidated=false" fragment (in bold/pink above) means that the method CacheEntry.isKnownToBeSigned() returns false.
I tried with a self-signed certificate which I added first in IE as "Trusted publisher" ; I also tried with a certificate signed by a CA that is known by IE -- no help.
So I really wonder : what does it take to have the plugin consider that each jar "isKnownToBeSigned" ?
Any thoughts ?
Note : we of course are considering packing jars, cleaning dead code, etc. to decrease applet size. But it doesn't help with the fact that the plugin considers the IP, which it shouldn't do in our case. And even with pack200 we're left with +350Kb of unnecessary downloads, not counting with future code to be developped ...
Thanks for any feedback
David
Browser is IE7.
Complete dump of system properties :
__applet_launched = 280874909499
__jvm_launched = 280874910680
acl.read = +
acl.read.default =
acl.write = +
acl.write.default =
awt.toolkit = sun.awt.windows.WToolkit
browser = sun.plugin
browser.vendor = Oracle
browser.version = 1.1
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator = \
file.separator.applet = true
http.agent = Mozilla/4.0 (Windows Vista 6.0)
http.auth.serializeRequests = true
https.protocols = TLSv1,SSLv3
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = C:\tools\Java\jre7\classes
java.class.version = 51.0
java.class.version.applet = true
java.endorsed.dirs = C:\tools\Java\jre7\lib\endorsed
java.ext.dirs = C:\tools\Java\jre7\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home = C:\tools\Java\jre7
java.io.tmpdir = C:\Users\taille\AppData\Local\Temp\
java.library.path = C:\tools\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Internet Explorer;;C:\oracle\ORA102\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\JavaSoft\JRE\1.3.1_06\bin;C:\ORACLE\Ora92\jre\1.3.1\bin;C:\ORACLE\Ora92\jre\1.1.8\bin;C:\tools\Groovy-1.7.5\bin;C:\tools\Graphviz2.28\bin;C:\tools\Git\cmd;C:\tools\tortoiseSVN\bin;C:\Program Files\Windows Imaging\;C:\oracle\ORA102\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\JavaSoft\JRE\1.3.1_06\bin;C:\ORACLE\Ora92\jre\1.3.1\bin;C:\ORACLE\Ora92\jre\1.1.8\bin;C:\tools\Groovy-1.7.5\bin;C:\tools\Graphviz2.28\bin;C:\tools\Git\cmd;C:\tools\tortoiseSVN\bin;C:\Program Files\Windows Imaging\;.
java.protocol.handler.pkgs = sun.plugin.net.protocol|com.sun.deploy.net.protocol
java.rmi.server.RMIClassLoaderSpi = sun.plugin2.applet.JNLP2RMIClassLoaderSpi
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.7.0_21-b11
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.7
java.vendor = Oracle Corporation
java.vendor.applet = true
java.vendor.url = http://java.oracle.com/
java.vendor.url.applet = true
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
java.version = 1.7.0_21
java.version.applet = true
java.vm.info = mixed mode, sharing
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.7
java.vm.vendor = Oracle Corporation
java.vm.version = 23.21-b01
javaplugin.nodotversion = 10212
javaplugin.version = 10.21.2.11
javaplugin.vm.options = -Ddeployment.trace.level=all -Duser.language=en
javawebstart.version = javaws-10.21.2.11
line.separator = \r\n
line.separator.applet = true
mrj.version.applet = true
os.arch = x86
os.arch.applet = true
os.name = Windows Vista
os.name.applet = true
os.version = 6.0
os.version.applet = true
package.restrict.access.com.sun.deploy = true
package.restrict.access.netscape = false
package.restrict.access.org.mozilla.jss = true
package.restrict.access.sun = true
package.restrict.definition.com.sun.deploy = true
package.restrict.definition.java = true
package.restrict.definition.netscape = true
package.restrict.definition.org.mozilla.jss = true
package.restrict.definition.sun = true
path.separator = ;
path.separator.applet = true
sun.arch.data.model = 32
sun.awt.enableExtraMouseButtons = true
sun.awt.warmup = true
sun.boot.class.path = C:\tools\Java\jre7\lib\resources.jar;C:\tools\Java\jre7\lib\rt.jar;C:\tools\Java\jre7\lib\sunrsasign.jar;C:\tools\Java\jre7\lib\jsse.jar;C:\tools\Java\jre7\lib\jce.jar;C:\tools\Java\jre7\lib\charsets.jar;C:\tools\Java\jre7\lib\jfr.jar;C:\tools\Java\jre7\classes;C:\tools\Java\jre7\lib\deploy.jar;C:\tools\Java\jre7\lib\javaws.jar;C:\tools\Java\jre7\lib\plugin.jar
sun.boot.library.path = C:\tools\Java\jre7\bin
sun.cpu.endian = little
sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = sun.plugin2.main.client.PluginMain write_pipe_name=jpi2_pid7004_pipe37,read_pipe_name=jpi2_pid7004_pipe36
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = Cp1252
sun.management.compiler = HotSpot Client Compiler
sun.net.client.defaultConnectTimeout = 120000
sun.net.http.errorstream.enableBuffering = true
sun.os.patch.level = Service Pack 2
trustProxy = true
user.country = FR
user.dir = C:\dtaille\TMA\perfs_br\newcert
user.home = C:\Users\taille
user.language = fr
user.name = taille
user.script =
user.timezone = Europe/Paris
user.variant =
Vider les propriétés de déploiement...
active.deployment.proxy.bypass.local = false
active.deployment.proxy.same = false
active.deployment.proxy.type = 3
deployment.baseline.url = https://javadl-esd-secure.oracle.com/update/baseline.version
deployment.blacklist.url = https://javadl-esd-secure.oracle.com/update/blacklist
deployment.blacklisted.certs.url = https://javadl-esd-secure.oracle.com/update/blacklisted.certs
deployment.browser.path = C:\Program Files\Mozilla Firefox\firefox.exe
deployment.browser.vm.iexplorer = true
deployment.browser.vm.mozilla = true
deployment.cache.enabled = true
deployment.cache.jarcompression = 0
deployment.cache.max.size = 726
deployment.capture.mime.types = false
deployment.console.startup.mode = SHOW
deployment.control.panel.log = false
deployment.expiration.decision.10.21.2 = later
deployment.expiration.decision.suppression.10.21.2 = true
deployment.expiration.decision.timestamp.10.21.2 = 9/6/2013 15:29:3
deployment.insecure.jres = PROMPT
deployment.javafx.mode.enabled = true
deployment.javapi.cache.update = false
deployment.javapi.lifecycle.exception = false
deployment.javapi.log.filename =
deployment.javapi.runtime.type = 0
deployment.javapi.stop.timeout = 200
deployment.javapi.trace.filename =
deployment.javaws.appicon.index = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\appIcon\appIcon.xml
deployment.javaws.associations = ASK_USER
deployment.javaws.cache.update = false
deployment.javaws.concurrentDownloads = 4
deployment.javaws.install = IF_HINT
deployment.javaws.installURL = http://java.sun.com/products/autodl/j2se
deployment.javaws.logFileName =
deployment.javaws.muffin.max = 256
deployment.javaws.shortcut = ASK_IF_HINTED
deployment.javaws.splash.index = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\splash\splash.xml
deployment.javaws.traceFileName =
deployment.javaws.uninstall.shortcut = false
deployment.javaws.update.timeout = 1500
deployment.javaws.viewer.bounds = 1723,197,881,546
deployment.jpi.mode.new = true
deployment.log = false
deployment.macosx.check.update = true
deployment.max.output.file.size = 10
deployment.max.output.files = 5
deployment.mime.types.use.default = true
deployment.modified.timestamp = 1380804178316
deployment.proxy.bypass.local = false
deployment.proxy.override.hosts =
deployment.proxy.same = false
deployment.proxy.type = 3
deployment.security.SSLv2Hello = false
deployment.security.SSLv3 = true
deployment.security.TLSv1 = true
deployment.security.TLSv1.1 = false
deployment.security.TLSv1.2 = false
deployment.security.askgrantdialog.notinca = true
deployment.security.askgrantdialog.show = true
deployment.security.authenticator = true
deployment.security.blacklist.check = true
deployment.security.browser.keystore.use = true
deployment.security.clientauth.keystore.auto = true
deployment.security.disable = false
deployment.security.https.warning.show = false
deployment.security.jsse.hostmismatch.warning = true
deployment.security.level = HIGH
deployment.security.local.applets = PROMPT
deployment.security.mixcode = DISABLE
deployment.security.notinca.warning = true
deployment.security.password.cache = true
deployment.security.run.untrusted = PROMPT
deployment.security.sandbox.awtwarningwindow = true
deployment.security.sandbox.casigned = PROMPT
deployment.security.sandbox.jnlp.enhanced = true
deployment.security.sandbox.selfsigned = PROMPT
deployment.security.trusted.policy =
deployment.security.validation.crl = false
deployment.security.validation.ocsp = false
deployment.security.validation.ocsp.publisher = false
deployment.system.cachedir = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\SystemCache
deployment.system.security.blacklist = C:\tools\Java\jre7\lib\security\blacklist
deployment.system.security.cacerts = C:\tools\Java\jre7\lib\security\cacerts
deployment.system.security.jssecacerts = C:\tools\Java\jre7\lib\security\jssecacerts
deployment.system.security.oldcacerts = C:\tools\Java\jre7\lib\security\cacerts
deployment.system.security.oldjssecacerts = C:\tools\Java\jre7\lib\security\jssecacerts
deployment.system.security.trusted.certs = C:\tools\Java\jre7\lib\security\trusted.certs
deployment.system.security.trusted.clientauthcerts = C:\tools\Java\jre7\lib\security\trusted.clientcerts
deployment.system.security.trusted.jssecerts = C:\tools\Java\jre7\lib\security\trusted.jssecerts
deployment.system.security.trusted.libraries = C:\tools\Java\jre7\lib\security\trusted.libraries
deployment.system.tray.icon = true
deployment.trace = true
deployment.update.mime.types = true
deployment.user.cachedir = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\cache
deployment.user.extdir = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\ext
deployment.user.logdir = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\log
deployment.user.security.blacklist = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\blacklist
deployment.user.security.blacklist.dynamic = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\blacklist.dynamic
deployment.user.security.blacklisted.certs = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\blacklisted.certs
deployment.user.security.policy = file:/C:/Users/taille/AppData/LocalLow/Sun/Java/Deployment/security/java.policy
deployment.user.security.sandbox.certs = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\sandbox.certs
deployment.user.security.saved.credentials = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\auth.dat
deployment.user.security.trusted.cacerts = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\trusted.cacerts
deployment.user.security.trusted.certs = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
deployment.user.security.trusted.clientauthcerts = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\trusted.clientcerts
deployment.user.security.trusted.jssecacerts = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecacerts
deployment.user.security.trusted.jssecerts = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecerts
deployment.user.security.trusted.libraries = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\security\trusted.libraries
deployment.user.tmp = C:\Users\taille\AppData\LocalLow\Sun\Java\Deployment\tmp
deployment.version = 7.21
deployment.webjava.enabled = true
java.quick.starter = falseThis behavior was introduced by a security "fix" intended to prevent a DNS re-binding attack which permits unsigned applets to escape the applet sandbox. The "fix" was, imo, very poorly thought out. You think you have a problem with 1.5 megabits of applet jars, but I have 8 megabytes, hundreds of thousands of users, with lousy networks. So now I'm stuck with a colocation vendor. Imagine my chagrin when they changed *their* ISP and thus their IP addresses.
As far as I can see, signed applets are already permitted (if the user allows) to communicate outside the sandbox, so this "fix" should not have been applied to signed jars, only to unsigned ones. There are a couple of other techniques that Oracle might have used to prevent this attack, but they chose the simplest one, effectively preventing anyone from using the most common, inexpensive strategies for improving the availability of their web-based Java applications. -
Cannot perform Bean lookup on signed Applet jar
Hi All,
I'm after developing an applet which runs from a number of jars on an Orion app server. Each one of these jars are signed and I can access the Applet okay. The problem is that I make remote reference to EJB's throughout the application. I cannot perform a Bean lookup on a signed jar. The only way it can be done is when the Client is granted all permissions. The client should pop up an option to grant permissions.If u are signing all the jar file along with the applet it should work
It does work fine with me. my code given below
note that i carry the following jar files along with my applet jar.
orion.jar,ejb.jar,,jta.jar,jnet.jar,jsse.jar,jcert.jar,parser.jar
and have them in my archive attribute of my html code for the applet
also all these jars are signed
hope this helps
regards
raees
public void init()
try
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.PROVIDER_URL, "ormi://solomon:23791/helloApp");
env.put("java.naming.security.principal", "admin");
env.put("java.naming.security.credentials", "secret");
Context ic = new InitialContext (env);
HelloHome hello_home = (HelloHome)ic.lookup("HelloBean");
Hello hello = hello_home.create ();
System.out.println (hello.helloWorld ());
}catch(Exception e)
e.printStackTrace(); -
How to load an applet jar file?
Hello everyone,
I have an applet that uses my own jar file and approximately 6 third party jar files. I set up jar indexing (jar -i) which will download the jar files when they are needed. All seems to work well, but now I want to manually load the jar files which I cannot get working.
When the applet starts, about 1/2 of the jar files are downloaded (because they are needed at startup). I then want to load the additional jar files in the background, after the gui is initialized. I have tried this using the below thread which is executed from within the applet's start method:
// Try to load additional jar files in background by loading a class from each jar file.
Thread loadClass = new Thread() {
public void run() {
System.out.println("Loading classes...");
try {
// Tried loading classes this way, doesn't work.
getClass().getClassLoader().loadClass("pkg1.Class1");
getClass().getClassLoader().loadClass("pkg2.Class2");
getClass().getClassLoader().loadClass("pkg3.Class4");
getClass().getClassLoader().loadClass("pkg4.Class4");
/* Loading classes this way doesn't work either.
Class.forName("pkg1.Class1");
Class.forName("pkg2.Class2");
Class.forName("pkg3.Class3");
Class.forName("pkg4.Class4");
catch(ClassNotFoundException e) {
// First attempt to load a class (pkg1.Class1) throws exception.
System.out.println("Can't find class: " + e.getMessage());
loadClass.start();As you can see from above I am trying to load a class from each of the jar files so that the jar files would load into memory/cache. Unfortunately, it cannot find the classes. These are the errors from the java console:
Loading classes...
Loading: pkg1.Class1
Connecting http://my.server.com/my_dir/pkg1/Class1.class with no proxy
Connecting http://my.server.com/my_dir/pkg1/Class1.class with cookie "JSESSIONID=some_big_long_char_list"
Can't find class: pkg1.Class1
So it appears the jar file is not being downloaded. When I take away the dynamic jar loading (removing the "jar -i" & adding them all to the applet archive list) the thread executes correctly. So I know the class names, etc, are correct. How does one load an applet jar file?
Any help/suggestions are appreciated.The above error I posted was because I forgot to index the jar files. That is why it couldn't find the jar file. I thought I was getting farther along with my problem, but I apparently just forgot to index the jars. I am now getting the problem that I got yesterday...
The applet freezes/hangs when it hits the thread. The GUI never opens (even though I'm running this thread right after the gui shows). The java console quits responding and the applet just stays the grey screen. I also tried the invoke later that you suggested.
public void start() {
// ...initialize gui...
// Applet freezes and remains grey, also the java console freezes.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
System.out.println("Loading classes...");
try {
// When I comment out the below forName calls, the thread will still run evidenced through the done print statement.
Class.forName("pkg1.Class1");
Class.forName("pkg2.Class2");
Class.forName("pkg3.Class3");
Class.forName("pkg4.Class4");
System.out.println("...Done loading classes");
catch(Exception e) {
System.out.println("Can't find class: " + e.getMessage());
} -
Question about Java Applet Jar file signing.
These questions pertain to Java 6 Standard Edition 1.6.0_22-b04 and later.
I have gone through the Oracle Java Tutorial for generate public and private key information
to sign a jar file, and how to sign the jar itself, all at
[http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html|http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html]
, and seek some clarification on the following related questions:
-In order to "escape" the java applet sandbox that exists around the client's
copy of the applet running in their web browser, ie.
(something forbidden by default), is verification of the signed applet enough, or is a policy file required
to stipulate these details?
-using the policytool policy file generator, what do I need to add under "Principals"
(if anything) when dealing with a Java applet? Are Codebase and SignedBy simply author information?
-If I choose to use a java.security.Permission subclass object set up in equivalent fashion within the Applet,
which class within the Applet jar do I instantiate that object in? Does it need to be mentioned
in the applet's jar Manifest.MF file?
-Is the "keystore database" a java language service/process which runs in
the Server's memory and is simply accessed and started by default
by the client verifier program (appletview/web browser)?
-The public key certificate file (*.cer) is put in the webserver directory holding
the Applet jar file (ie. Apache Tomcat, for example).
-Presumably, the web browser detects the signed jar
and certificate file, and provides the browser pop up menu asking the user
about a new, non recognised certificate (initially).
Is this so?
-With this being the case, can the applet now escape
the sandbox, be it with or without the stipulated
policy permissions?848439 wrote:
-In order to "escape" the java applet sandbox that exists around the client's
copy of the applet running in their web browser, ie.
(something forbidden by default), is verification of the signed applet enough, or is a policy file required
to stipulate these details?Just sign the applet, the policy file is not necessary.
-Is the "keystore database" a java language service/process which runs in
the Server's memory and is simply accessed and started by default
by the client verifier program (appletview/web browser)?No.
-The public key certificate file (*.cer) is put in the webserver directory holding
the Applet jar file (ie. Apache Tomcat, for example).No. For a signed Jar, all the information is contained inside the Jar.
-Presumably, the web browser detects the signed jar
and certificate file, and provides the browser pop up menu asking the user
about a new, non recognised certificate (initially).
Is this so?No. It is the JVM that determines when to pop the confirmation dialog.
-With this being the case, can the applet now escape
the sandbox, ..Assuming the end-user OK's the trust prompt, yes.
..be it with or without the stipulated
policy permissions?Huh? -
JAR creation failed , for Command bean DC
Hi Experts,
I am trying to access an EJB module DC from WebDynpro through Java bean model DC.
In this when i tried to create a Jar file of the Java bean model, i got this error.
JAR creation failed. See details for additional information.
Problem writing /LocalDevelopmentdc_aptcbsap.com/bin/pg/com/atos/apt/bean/APTCommandBean.class to JAR: duplicate entry: pg/com/atos/apt/bean/APTCommandBean.class
I have created in all total 4 DC
1) EJB DC
2) EAR DC
3) Java bean DC
4) WebDynpro DC
I have reffered to the tutorial : Using EJBs in Web Dynpro application.
Can you tell me what am i missing?
Ashish ShahHi Sridhar,
Thanks for your suggestion.
I have built and deployed the EAR DC.
But When I added the following referencesto Java bean DC
1) EAR DC , EJB DC
2) ejb20.jar
and i tried to build java bean DC project, it throws error for these referenced DC.
And these referenced DCs are removed from the project.
Do i have to add anything in the Public part of EJB or EAR DC?
Can you tell me how to add those references in Public part and how to utilise them in other projects?
Regards,
Ashish Shah -
Jar creation from JBuilder file structure
Hi,
I've got a program written in jBuilder 4. It does not have the jar creation feature.
So I've created a jar manually, but I'm having problems finding the main class from the manifest.
I've created the manifest with no problems:
Manifest-Version: 1.0
Main-Class: Application1
Created-By: me
Where Application1 is the name of my main class. I've even tried chnging the file path to Application1 such as:
Main-Class: programfile/classes/programname/Application1
But whenever I create the jar and double click on it I get an error saying that cannot find main class.
Does anybody know how to access the main class from a program created in JBuilder???
Cheers for any help,
AlCheers for the suggestion, but I managed to sort the problem.
For anyone else out there who's trying to jar a JBuilder file manually:
You only need to jar the "class" folder that JBuilder creates for you, not ther entire project. (If you have a file containing images then that will need to be included as well).
If you've not named your main class the same as the pakage name, then the mane of your main class is packagename.main
For example if your package is called "Program" and your main class is called "Main" then you need to include the following line in the manifest:
Main-Class: Program.Main
Hopes this helps someone.
Al -
JAR creation failed. See details for additional information.-invalid header
Hi
I am working with 2 databases , 1 is oracle and the other is sybase in my java application.
The java application gets data from both the databases and creates 3 output files and 1 audit log file .
Now i tried creating the jar file
my manifest file looks like this :
Manifest-Version: 1.0
Sealed: true
Main-Class: tableA
Class-Path:jtds-1.2.jar;classes12.jar ----------------------------> is this correct .
Now when i try to create the jar file it gives me an err
JAR creation failed. See details for additional information.-
invalid header field
invalid header field
ANyone pls help me ... I am creating the jar file like rhis
export -> selecting JAR file -> selecting 1 and 3 rd checkboxes ->location of the jar file -> next->selecting 2 checkboxes in JAR PACKAGING OPTIONS -> ( my question is how to create the manifest file with class-path , their is no option ) so i am creating the manifest file and creating the jar file and then adding the class-path to the manifest file and removing the jar file and recreating the jar file now selecting the manifest file .
is this giving the above error --> if so how to create the manifest file before creating the jar file with class-path and main classDouble post: [http://forums.sun.com/thread.jspa?threadID=5358017&messageID=10559776#10559776]
-
Loading images inside applet JAR
Hi
This is my issue: I have an applet which contains images inside the applet JAR. I want to display these images in my applet, but apparently due to browser access restrictions, I'm not allowed.
My first code was like this:
//security restrictions on browsers do not allow getResource
ImageIO.read(MyClass.class.getResource("imgs/img.png"));
//getResourceAsStream should be allowed by browsers
ImageIO.read(MyClass.class.getResourceAsStream("imgs/img.png"));Both lines work when I execute the applet locally (command line / programming IDE), but when I deploy it to my web server, the resource "imgs/img.png" becomes a relative URL to my web application context (like /webcontext/MyClass/imgs/img.png). It works locally because the call to getResource returns a URL object with "file:" protocol, but I need it to look for my images bundled inside the JAR, not web hosted images.
I need to avoid making the applet look for these images as a web resource... how can I do it?
Thanks!dev@java wrote:
warnerja wrote:
I'm not convinced the code you posted wouldn't work, but since this is an applet, you have access to the Applet class. Check out the Applet.getImage method in conjunction with Applet.getCodeBase.
[http://java.sun.com/javase/6/docs/api/java/applet/Applet.html]
getCodeBase returns my web context, like http://myhost.com/mycontext/ , so it is pretty much the same as above.
Thanks for your replyThat is the way to load resources though. Hence back to my earlier statement about not being convinced it would not work, with this addition: It should work, assuming you actually do have the resources properly located with the web app, whether they be in a jar, or loose files relative to where the web app is. My guess at this point is that they are not. -
Weblogic jar creation in Jbuilder 8
Hi,
I have installed Weblogic Server 7.0 and Jbuilder 8. I configure Weblogic as the
application server, but there is one service (Jar Creation) which is never enabled.
Why? Isn't it possible to create JAR files for weblogic as I did in Jbuilder 6?
Should I use any weblogic specific tool for doing so?
The JAR files I create with Jbuilder8 don't contain the stub and skeleton classes
I need!!!! In Jbuilder6 it was not necessary to specify a server application for
every service, just one for all, and it worked fine, generating everything I needed
in my JAR.
Help!!!!Is there any bea newsgroup for JBuilder, as far as there's a JBuilder Weblogic
Edition version launched or should I try in Borland's newgroups?
"Slava Imeshev" <[email protected]> wrote:
Hi Ignacio,
I suggest contacting Borland support or posting this question in the
related
jbuilder newsgroup.
Regards,
Slava Imeshev
"Ignacio" <[email protected]> wrote in message
news:[email protected]..
Hi,
I have installed Weblogic Server 7.0 and Jbuilder 8. I configure Weblogicas the
application server, but there is one service (Jar Creation) which isnever
enabled.
Why? Isn't it possible to create JAR files for weblogic as I did inJbuilder 6?
Should I use any weblogic specific tool for doing so?
The JAR files I create with Jbuilder8 don't contain the stub and skeletonclasses
I need!!!! In Jbuilder6 it was not necessary to specify a serverapplication for
every service, just one for all, and it worked fine, generating everythingI needed
in my JAR.
Help!!!! -
Where is the Applet JAR file?
When an Applet (the JAR) is downloaded to the local PC, exactly where (the directory) we can locate the Applet JAR file? Is the file managed by the Internet browser?
This has got to be browser-specific.
You shouldn't write code that depends on this kind of information anyway. -
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. -
I am trying to create a JAR file with the java.util.jar library/package.
I am able to create the file and get files into it but I am unable to access it from a java program.
If i create the same jar file with the commandline utility i can access it just fine from within a java app. The two jars are identical in their content and structure however they differ in overall size of about 5-10K. Is there something special i need to do to make this jar useable by java? is the API in adequate for this kind of thing? are there any alternatives?
-ChazZthe code for JAR creation:
"files" is an arraylist i build that consists of paths to the files i wish to put in the jar
FileInputStream fi = new FileInputStream("." + PATH_SEPARATOR + "MANIFEST.MF");
Manifest m = new Manifest(fi);
BufferedOutputStream bo = new BufferedOutputStream(new FileOutputStream(jarFile));
JarOutputStream jo = new JarOutputStream(bo, m);
Object[] f = files.toArray();
for(int x=0; x<f.length; x++)
String act = (String)f[x];
BufferedInputStream bi = new BufferedInputStream(new FileInputStream(act));
//file paths are too deep in filesys to i strip off the first part of the path
JarEntry je = new JarEntry(act.substring(act.lastIndexOf("psdi")));
jo.putNextEntry(je);
byte[] buf = new byte[1024];
int anz = -1;
while ((anz = bi.read(buf)) != -1)
jo.write(buf, 0, anz);
jo.flush();
jo.closeEntry();
bi.close();
jo.close();
bo.close();
} -
hi all,
when i export java project as jar file i got a message[i] jar creation failed
it's because of duplicate entry: .classpath
how can i avoid this problem
Thanks alotWe're going to need more information to offer any realistic help. Duplicate class path entry where?
Walk us through your process. For doing build functionality of just about any kind I would recommend learning to use ANT. It will make your life much happier.
PS. -
JAR creation failed in Eclipse. error in opening zip file
When Exporting the project to Runnable JAR file in Eclipse, I have "JAR creation failed", with "error in opening zip file" in details and nothing else.
I've tried running the new Eclipse environment by starting a new .metadata file. Then, I rebuilt the project - it runs as before.
What zip file is referred to?I imagine it's the "Export destniation" jar/zip. Perhaps it's being
used by a running application and is therefore locked against writing.
Have you tried deleting it from the command line?
[email protected] wrote:
> When Exporting the project to Runnable JAR file in Eclipse, I have
> "JAR creation failed", with "error in opening zip file" in details and
> nothing else.
>
> I've tried running the new Eclipse environment by starting a new
> .metadata file. Then, I rebuilt the project - it runs as before.
>
> What zip file is referred to?
Maybe you are looking for
-
BI Publisher 10.1.4.3 - To connect to AD for report generation
Hi, I need to generate a report against an LDAP(Active directory) . I'm using BIP 10.1.4.3. When i try to configure a datasource, the options present are 1. JDBC 2.JNDI 3. File 3.OLAP. Can any one guide on how to connect to Active Directory in BI P
-
How to open file system file from Apex?
Hi, Can someone help me to find how to open a pdf file e.g. test.pdf from apex when someone click on a button ABC? The file is located in /C/ Thanks in advance Dip
-
Has anyone got a workaround for the iTunes 12 sorting movies bug?
I have movies in various playlists in my iTunes 12.0.1 library with various metadata and nice artwork added. When selecting sort by 'Genre', 'Sort Albums by Title' or sort by 'Albums' then 'Sort by Title' (both of these sorting options to enable brow
-
Duplicate E-mail sent through Human Task Workflow - random behaviour
Hello All, We have Human Work Flow implemented for a process to wait for human intervention to approve a task. Whenever a new task is attempted, it goes for an email approval to a DL by sending notification. This should happen only once and after app
-
Hi all, What would heppen if forall statement fails in procedure. How to handle it in the exception handling section. Kindly help me . thank you regards P Prakash