Applets with multiple JRE
Hi
I have two web based applications using applets that are supported on two different JRE versions. The vendors of these applications only support the app on the specific version of JRE.
How do i make two versions of JRE coexist on the same machine? And more importantly , how do I force an applet to use the right version of JRE when it downloads? I was able to get two JREs to coexist on the same machine. However, the most recent JRE installed is always used irrespective of the application that I connect to.
Any thoughts
thanks
-- T
Unfortunately that is the way it works.
The user (client) can change which version plugin is active in the browser. This can be done by making the appropriate selection in the Java Control Panel. This works for Java versions prior to 1.5.0_06. (This restriction may change in the future.)
You could also modify the html that calls the applets to specify which Java version to use, if you have access to the html. See the Java Plugin Developers Manual for the information. This is also restricted to versions earlier than 1.5.0_06.
Similar Messages
-
How to write a applet with multiple menu
Hi all,
How to write a applet with multiple menu or please tell me where can I get a examples
thanksi'm writing a project and it seem not work with browser. If anyone can help please leave me a e-mail so that i can send my source to you.
Thanks so much -
How to use an Applet with multiple-jars
Hi everybody,
I would like to use an applet with multiple-jars.
ex:
<applet codebase="." archive="main.jar,Addon1.jar,Addon2.jar" code="Appl.class" id="MyTest" width="600" height="30">
<param name = "MyParam" value = "1;2">
</applet>
An applet with :
-> 1 Main JAR
-> X Addon JARs (X : a parameter "PRM")
My main part knows the parameter "PRM" -> knows which addon to use
My question is, how do I use classes from addons, inside the main part (and vise-versa if possible) ?
Thanks in advance
Best regardsI try what you say :
=== HTML ===
<applet codebase="." archive="Main.jar,Addon1.jar" code="Test.Appli.class" id="MyTest" width="600" height="30">
<param name = "myPrm1" value = "1;2">
</applet>=== MAIN JAR ===
package retest;
interface InterfAddOn1 {
public void AfficheTest1(String sStrTest);
public class Ctest {
public Ctest() {}
public void unTest(String sClassNameR) {
String sClassName = "PackTestAddon.TestClass1";
try {
Object oObj = Class.forName(sClassName).newInstance();
((InterfAddOn1) oObj).AfficheTest1(" Hello World ");
} catch (ClassNotFoundException ex1) {
System.out.println("ERR Class not found");
} catch (IllegalAccessException ex1) {
System.out.println("ERR Illegal Access");
} catch (InstantiationException ex1) {
System.out.println("ERR Instantiation Exception");
}=== ADDON JAR ===
package PackTestAddon;
public interface InterfAddOn1 {
public void AfficheTest1(String sStrTest);
package PackTestAddon;
public class TestClass1 implements InterfAddOn1 {
public TestClass1() {}
public void AfficheTest1(String sStrTest) {
System.out.println("Test :"+sStrTest);
}I have this error :
Exception in thread "AWT-EventQueue-2" java.lang.ClassCastException: PackTestAddon.TestClass1
at retest.Ctest.unTest(Ctest.java:58)
at retest.Appli.actionPerformed(Appli.java:442)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I don't really know why ... =;o(
Helppppp ... Thanks in advance. -
XI Client Installation with Multiple JREs
I'm wondering if it is possible to have multiple JREs greater than 1.4 installed and still use the XI client for IB/IR. I have configured JWS to only use the 1.4.2 version I have installed, but it still tries to startup on Java 6.
Thanks in advance.
Peter
Sorry for the simple question, but I haven't been successful in getting this to work.One "simple" way of doing this is to manually start Java Web Start 1.4 and run IR and ID directly from there.
Just run \Java\j2re1.4.2_xx\javaws\javaws.exe and once it opens, type the addresses of IR and ID in the "Location" field (http://<host>:<port>/rep/start/repository.jnlp and http://<host>:<port>/dir/start/directory.jnlp). Once the applications are loaded (once you see the icon in the "Applications" frame) you may click on the Start button. Then the applications will be started using JRE 1.4.
In order to open the links directly from the XI start page, there is another option. Run the Control Panel/Java entry (assuming you have installed JDK 1.5 or superior), go to the Java tab. The upper part configuration (click on View) is regarding the execution of Java apps and applets. You may select the JREs you want to load for these (select 1.5). In the lower part of the screen, there is the configuration for runtime settings, where you select the JRE that runs the JNLP applications. Here, you may select JRE 1.4. But be aware that all .jnlp's that you run will be loaded with JRE 1.4.
Regards,
Henrique. -
Using tag OBJECT on a machine with multiple jre versions
Dear friends,
i guess that this question has been already answered, but i can't find the thread with all infos i need.
So please excuse me if i'm redundant.
This is my problem:
i have a web application that runs an applet, embedded in an html page;
by now the applet is loaded with the standard tag <APPLET>.
I found many Sun's official pages talking about the use of OBJECT tag to specify the jre version that is supposed to run the applet.
I tried many ways but i can't reach the way to avoid loading the applet with the latest jre installed on my pc.
Here is the code of my OBJECT:
<OBJECT NAME="client" CLASSID="clsid:CAFEEFAC-0014-0002-0009-ABCDEFFEDCBB" HEIGHT="38" WIDTH="335" >
<PARAM NAME="NAME" VALUE="client">
<PARAM name="type" value="application/x-java-applet;jpi-version=1.4.2_09">
<PARAM NAME="CODE" VALUE="it.fabio.client">
<PARAM NAME="CODEBASE" VALUE="/myapp">
<PARAM NAME="ARCHIVE" VALUE="mylib.jar">
</OBJECT>The machines where the application is deployed have the 1.4.2_09 and the 1.5.0_03 jre versions, but my applet runs only on 1.4.2_09 version.
So i have to find a way to tell the browser which jre has to be called.
Thanks in advance for help.
RegardsWait a second...there is more to that error message that I overlooked before.
There might be something other than just the way I set the CODE and CODEBASE parameters wrong here
Any ideas?
Here is the entire messsage:
load: class DisplayMonoApplet.class not found.
java.lang.ClassNotFoundException: DisplayMonoApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more -
Error in bibean applet with latest JRE
We have bi bean application developed using Applet It works fine with
JRE 1.5 or earlier JRE version but when I access same thing in PC that has JRE 1.5.0_09 it gives XML error
<Line 5, Column 21>: XML-20123: (Fatal Error) '>' Missing from end tag.
<Line 5, Column 21>: XML-20100: (Fatal Error) Expected 'EOF'.
java.lang.NullPointerException
at oracle.dss.persistence.persistencemanager.server.PersistenceManagerSupport.loadFactoryFromXML(PersistenceManagerSupport.java:359)
at oracle.dss.persistence.persistencemanager.server.PersistenceManagerSupport.<init>(PersistenceManagerSupport.java:157)
at oracle.dss.persistence.persistencemanager.server.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:88)
at oracle.dss.persistence.persistencemanager.server.InitPersistenceManagerFactory.getInitialContext(InitPersistenceManagerFactory.java:36)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at javax.naming.directory.InitialDirContext.<init>(Unknown Source)
at oracle.dss.persistence.persistencemanager.server.InitialPersistenceManager.<init>(InitialPersistenceManager.java:105)
at oracle.dss.connection.server.drivers.persistence.PersistenceConnectionDriverImpl.connect(PersistenceConnectionDriverImpl.java:150)
at oracle.dss.connection.server.ConnectionImpl.connect(ConnectionImpl.java:285)
at oracle.dss.connection.client.Connection.connect(Connection.java:425)
at oracle.dss.connection.client.Connection.connect(Connection.java:342)
at oracle.dss.metadataManager.client.MetadataManager.setConnectionObjects(MetadataManager.java:4235)
at oracle.dss.metadataManager.client.MetadataManager.attach(MetadataManager.java:924)
at oracle.dss.metadataManager.client.MetadataManager.attach(MetadataManager.java:840)
at oracle.dss.datautil.client.XMLManagerFactory.createQueryManager(XMLManagerFactory.java:196)
at oracle.dss.datautil.client.ManagerFactoryImpl.lookupQueryManager(ManagerFactoryImpl.java:178)
at oracle.dss.datautil.client.ManagerFactoryImpl.lookupMetadataManager(ManagerFactoryImpl.java:221)
at oracle.dss.datautil.client.ManagerFactoryImpl.lookupManager(ManagerFactoryImpl.java:128)
at edsl.olap.BIView.getMetadataManager(BIView.java:436)
at edsl.olap.BIView.openView(BIView.java:565)
at edsl.olap.BIView.jbInit(BIView.java:123)
at edsl.olap.BIView.init(BIView.java:112)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)BIBeans version 10.1.2.0.1 is certified only with Sun JRE:
1.3.1_11
1.4.1_04
1.4.2_03 -
Hi!
Question about the problem mentioned in subject.
I have configured that JNLP opens with 1.5 version, both versions are enabled in Java Control Panel Runtime Settings but when I try to start a desktop java console says:
Java Web Start 1.5.0_22
Using JRE version 1.6.0_07 Java HotSpot(TM) Client VM
And the opening of the desktop creates an exception:
Java Web Start - Invalid Argument Error
TooManyArgumentsException[ Too many arguments supplied: {C:\WINDOWS\Temporary, Internet, Files\Content.IE5\....
I'm trying to open my desktop with 1.5 version and other programs with 1.6 version. What is it that I still need to do? I'm kind of confused with this. Some of my collagues have succeeded with this and some doesn't, with the same configuration.
So the question is, how to use multiple JREs with IE8 so that one application uses 1.5 version and others 1.6 version?
Br,
Katri
Edited by: ka**** on 09-Mar-2011 01:16
Edited by: ka**** on 09-Mar-2011 03:16ka**** wrote:
..Question about the problem mentioned in subject.No "Using multiple JREs (1.5.0_20 and 1.6.0_07) with Internet Explorer 8" is a statement. To transform it to a question would be something like "How to use multiple JREs (1.5.0_20 and 1.6.0_07) with Internet Explorer 8?".
Once you can come up with an actual question, I might look at this more closely. -
How to load an applet with older version of JRE?
Hi All,
I'm writing an applet which should read the username from the user's system using System.getProperty("user.name") method. I've JRE 1.4.2 in my browser, and it's throwing a AccessControlException whenever the applet is trying to read the "user.name" system property. So, I want to load this particular applet with an older version of JRE, say JRE 1.3. I've tried various approaches like,
<jsp:plugin type="applet" code="LoginApplet.class" archive="login.jar"
jreversion="1.3" iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
</jsp:plugin>
and also tried OBJECT tag,
<OBJECT
classid="clsid:CAFEEFAC-0013-0000-0000-ABCDEFFEDCBA" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
width="200" height="200" align="baseline" >
<PARAM NAME="code" VALUE="LoginApplet.class">
<PARAM NAME="archive" VALUE="login.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
</OBJECT>
I've not tried the simple APPLET tag because we can't specify a java plugin using the APPLET tag.
In both the above methods, I'm still getting AccessControlException. In Java console, I'm seeing Java Plugin as 1.4.2.
Can someone tell me is it possible to read the "user.name" system property from user's machine using Applets? If yes, how?
Thanks,
Tarun.Applets are prevented from doing certain things - reading data is one - to maximize security. You can either add permissions to the computer that the applet is running on, or you can sign the applet.
See
http://java.sun.com/docs/books/tutorial/security1.2/tour1/step2.html
and
http://forum.java.sun.com/thread.jspa?threadID=686184&tstart=45 -
Do I need to make an applet with swing point to the JRE 1.4 plug-in?
Do I need to make an applet with swing point to the JRE 1.4 plug-in? I mean, in 1.3.1 plug-in, if you did not run your code through the HTML converter, the applet would still use the browsers JRE (JVM). However, with 1.4.0, it seems that you don't need to. Is this correct?
When you ran an applet that has been compiled under 1.4 and needs classes or methods from 1.4 with an old HTML file (presumedly with the <object> tag that still refers to JRE 1.3+), the browser is going to look at the <object> tag and see that at least JRE1.3.1 is needed to correctly run the applet and since 1.4, which is higher than 1.3+, is on the system, it ignorantly proceeds to load and run the applet. The problem that you're going to run into is when you deploy the applet on the web and your viewer only have JRE1.3+, your applet which really needs 1.4, will crap out....
;o)
V.V. -
Hi
I want to install 2 applets on real java card. They both are in the same package and cna use each other.
How can i do this on JCOP ?
and what if they are on difference packages and what if i am using some other lib as well ? do i need to install that lib too if yes then how ?
BR
UmerIf your packages and applets are in one JCOP Java Card project, this should be handled for you. You can have multiple applets in a package, you can have multiple instances of a single applet, and you can have multiple packages with multiple applets as well as library packages.
If you want to access an applet from another applet in the same package, it is like referencing any other class instance. If they are in different packages you need to use shareable objects. This is because of the applet firewall.
Cheers
Shane -
Which is better - 1 HTML page with multiple applet panels or 1 applet with
Hi friends,
This is a critical doubt which decides the future of my project.
I have implemented a graph in which an html shows 3 panels on the screen via calling that applet 3 times.
Would it be good if we call that applet only once and modify the applet to show 3 panels?
Thanks in advancehai paskal,
well having 3 panels in a single applet will not make a big difference when compared to having 3 diff applets with 1 panel each ...
what matters most is how u want to have ur web page ...
if you have 3 different applets then you can place them in a position according to ur wish ...
if it is one then all of them will be together ...
Peter -
Blank applet using Sun JRE plug-in on 10g
I have successfully run multiple forms using WebUtil with JInitiator on 10g DS and
AS. I have been struggling with getting forms to show up in the applet when I try to
use webutiljpi.htm. When I try to run a form from the builder, It loads an applet with
a broken image icon in the upper left hand corner and the status bar reads:
Loading Java Applet Failed...The java console gives me this(removed header stuff):
Java Plug-in 1.5.0_12
Using JRE version 1.5.0_12 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\xxxxxx
load: class oracle.forms.webutil.common.RegisterWebUtil not found.
java.lang.ClassNotFoundException: oracle.forms.webutil.common.RegisterWebUtil
I looked in Metalink and found an article talking about the webutil.cfg file and
assuring that the path to frmwebutil.jar isn't identified properly, but I think it is.
Anyway, I'm stuck and I must be missing something easy. Here are the entries for
my JInitiator and JPI configs and my default.env file. Any help would be greatly
appreciated.
[jasonjpi]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar,frmwebutil.jar,Jacob.jar
lookAndFeel=oracle
pageTitle=10g Development
width=950
height=600
splashscreen=false
background=false
#colorScheme=blue
logo=false
codebase=c:\oracle\ora10g\forms\java
workingDirectory=f:\oraapps\dev\assist\fmb10g\jason_conversion\
envFile=default.env
jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
jpi_codebase=https://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,4,2,4
jpi_mimetype=application/x-java-applet;version=1.4.2
jpi_download_page=https://java.sun.com/j2se/1.5.0/download.html
[jasonwebutil]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar
lookAndFeel=generic
pageTitle=Assist - 10g Development
width=950
height=600
splashscreen=false
background=false
colorScheme=blue
logo=false
workingDirectory=f:\oraapps\dev\assist\fmb10g\jason_conversion\
default.env
ORACLE_HOME=C:\oracle\ora10g
FORMS_PATH=C:\oracle\ora10g\forms;c:\oracle\ora10g\forms\java;F:\oraapps\dev\Assist\fmb10g\Jason_Conversion;g:\oraapps\prod\assist\icons
WEBUTIL_CONFIG=C:\oracle\ora10g\forms\server\webutil.cfg
FORMS_RESTRICT_ENTER_QUERY=TRUE
PATH=C:\oracle\ora10g\bin;C:\oracle\ora10g\jdk\jre\bin\client
FORMS=C:\oracle\ora10g\forms
CLASSPATH=C:\oracle\ora10g\j2ee\OC4J_BI_Forms\applications\formsapp\formsweb\WEB-INF\lib\frmsrv.jar;C:\oracle\ora10g\jlib\repository.jar;C:\oracle\ora10g\jlib\ldapjclnt10.jar;C:\oracle\ora10g\jlib\debugger.jar;C:\oracle\ora10g\jlib\ewt3.jar;C:\oracle\ora10g\jlib\share.jar;C:\oracle\ora10g\jlib\utj.jar;C:\oracle\ora10g\jlib\zrclient.jar;C:\oracle\ora10g\reports\jlib\rwrun.jar;C:\oracle\ora10g\forms\java\frmwebutil.jarHi,
Can you define
[jasonjpi]
WebUtilArchive=frmwebutil.jar,jacob.jar -- you use jacob.jar but it isn't in your classpath in your default .env . You must add it there too
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar,frmwebutil.jar,Jacob.jar -- remove frmwebutil an jacob.jar here
lookAndFeel=oracle
pageTitle=10g Development
width=950
height=600
splashscreen=false
background=false
#colorScheme=blue
logo=false
codebase=c:\oracle\ora10g\forms\java --replace by codebase=/forms/java should be virtual directoryworkingDirectory=f:\oraapps\dev\assist\fmb10g\jason_conversion\
envFile=default.env
this is a little messy ;-)
jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
jpi_codebase=https://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,4,2,4
jpi_mimetype=application/x-java-applet;version=1.4.2
jpi_download_page=https://java.sun.com/j2se/1.5.0/download.html
should be
jpi_classid=clsid:CAFEEFAC-0015-0000-0012-ABCDEFFEDCBA
jpi_codebase=https://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,5,0,12
jpi_mimetype=application/x-java-applet;version=1.5.0
jpi_download_page=https://java.sun.com/j2se/1.5.0/download.html
then try again. Normally you even don't have to restart your OC4J
Hope it helps
Erwin -
Find and replace with multiple files and with a watch folder
I am trying to create a watch folder that uses red_menace script to:
1. Have a folder that receives multiple xml files that run the script one by one.
2. then move the files to an output folder.
I tried modifying the set TheFIle to choose file -- the original text file to:
with multiple selections allowed
But that doesn't seem to work. I know i'm missing a step. Any help is much appreciated!
Thanks!
The way i'd like to setup things is having an input folder on the desktop (or just have the application on the desktop and I can drag the files onto it), and let it do it's thing. Once it's done have it export the xml files into an output folder.
Here's what i got so far:
on open
set TheFIle to choose file -- the original text file
set TheFolder to ("Macintosh HD:Users:user1:Desktop:out") -- the folder for the output file
set TheName to (GetUniqueName for TheFIle from TheFolder) -- the name for the output file
set TheText to read TheFIle -- get the text to edit
set Originals to {"KPCALDATE", "KPCALEVENT", "KPCALDAY", "KPCALBODY", "obituaries name", "" & return & "</cstyle></pstyle>" & return & "<pstyle name=\"obituaries text\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>", " .com", " .net", " .org", " .edu", "www .", "www. ", "Ho- nolulu", "<pstyle name=\"kicker 12\"><cstyle allcaps=\"1\">fashion news</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "<component name=\"Headline 1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline 1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 36\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>-", "-", "
Per serving:", "<pstyle name=\"Titlebar - mini, red\"><cstyle allcaps=\"1\">NATION & World </cstyle><cstyle allcaps=\"1\">Report</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "</cstyle></pstyle>"} -- the terms that can be replaced
set Replacements to {"subhed", "subhed", "subhed", "Normal", "obituaries text", ", ", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>
", ".com", ".net", ".org", ".edu", "www.", "www.", "Honolulu", "", "<component name=\"Headline1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 27\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>", " ", "
Per serving:", "","" & return & "</cstyle></pstyle>"} -- the replacement terms
repeat with AnItem from 1 to count Originals
set TheText to (replaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
end repeat
try -- write a new output file
tell application "Finder" to make new file at TheFolder with properties {name:TheName}
set OpenFile to open for access (result as alias) with write permission
write TheText to OpenFile starting at eof
close access OpenFile
on error errmess
try
log errmess
close access OpenFile
end try
end try
end open
to GetUniqueName for SomeFile from SomeFolder
check if SomeFile exists in SomeFolder, creating a new unique name if needed
parameters - SomeFile [mixed]: a source file path
SomeFolder [mixed]: a folder to check
returns [text]: a unique file name and extension
set {Counter, Divider} to {"00", "_"}
-- get the name and extension
set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
if TheExtension is missing value then set TheExtension to ""
set TheName to text 1 thru -((count TheExtension) + 2) of TheName
set NewName to TheName & "." & TheExtension
tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
repeat while it contains NewName
set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
set NewName to TheName & Divider & Counter & "." & TheExtension
end repeat
end tell
return NewName
end GetUniqueName
to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
displays a dialog for multiple item edit (note that a return is used between each edit item)
for each of the items in SomeItems, a line containing it's text is placed in the edit box
the number of items returned are padded or truncated to match the number of items in SomeItems
parameters - SomeItems [list]: a list of text items to edit
TheTitle [boolean/text]: use a default or the given dialog title
ThePrompt [boolean/text]: use a default or the given prompt text
returns [list]: a list of the edited items, or {} if error
set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
if TheCount is less than 1 then return {} -- error
if ThePrompt is in {true, false} then -- "with" or "without" Prompt
if ThePrompt then
set ThePrompt to "Edit the following items:" & return -- default
else
set ThePrompt to ""
end if
else -- fix up the given prompt a little
set ThePrompt to ThePrompt & return
end if
if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
set TheTitle to "Multiple Edit Dialog" -- default
else
set TheTitle to ""
end if
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
repeat with AnItem from 1 to TheCount -- pad/truncate entered items
try
set the end of TheItems to (item AnItem of TheInput)
on error
set the end of TheItems to ""
end try
end repeat
return TheItems
end EditItems
to replaceText of SomeText from OldItem to NewItem
replace all occurances of OldItem with NewItem
parameters - SomeText [text]: the text containing the item(s) to change
OldItem [text]: the item to be replaced
NewItem [text]: the item to replace with
returns [text]: the text with the item(s) replaced
set SomeText to SomeText as Unicode text -- TID's are case insensitive with Unicode text
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
return SomeText
end replaceText
Message was edited by: gamebreakersWhen you use the open or adding folder items to handlers, you need to add the parameters for the file items passed to them.
I'll go ahead and post the applet/droplet version of my original script from the previous topic for reference:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #FFEE80;
overflow: auto;"
title="this text can be pasted into the Script Editor">
-- search and replace multiple items applet/droplet/folder action
-- the terms to replace - edit as needed
property EditableItems : {¬
"one", ¬
"two", ¬
"three", ¬
"four", ¬
"five", ¬
"six", ¬
"seven", ¬
"eight", ¬
"nine", ¬
"ten", ¬
"eleven", ¬
"twelve", ¬
"thirteen", ¬
"fourteen", ¬
"fifteen", ¬
"sixteen", ¬
"seventeen", ¬
"eighteen", ¬
"nineteen", ¬
"twenty"}
-- the folder for the output file(s) - change as needed
property TheFolder : (path to desktop)
property LastEditItems : EditableItems
on run
the applet/droplet was double-clicked
open (choose file with multiple selections allowed)
end run
on open TheItems
items were dropped onto the applet/droplet
parameters - TheItems [list]: a list of the items (aliases) dropped
returns nothing
repeat with AnItem in TheItems
ReplaceMultipleItems from AnItem
end repeat
end open
on adding folder items to this_folder after receiving these_items
folder action - items were added to a folder
parameters - this_folder [alias]: the folder added to
these_items [list]: a list if items (aliases) added
returns nothing
repeat with AnItem in these_items
ReplaceMultipleItems from AnItem
end repeat
end adding folder items to
to ReplaceMultipleItems from SomeFile
replace multiple text items in SomeFile
parameters - SomeFile [alias]: the file to replace items in
returns nothing
set TheName to (GetUniqueName for SomeFile from TheFolder) -- the name for the output file
set TheText to read SomeFile -- get the text to edit
set Originals to (choose from list EditableItems default items LastEditItems with prompt "Select the terms to replace:" with multiple selections allowed) -- the specific terms to replace
set LastEditItems to Originals
set Replacements to (EditItems of Originals with Title given Prompt:"Edit the following replacement terms:") -- the replacement terms
repeat with AnItem from 1 to count Originals
set TheText to (ReplaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
end repeat
try -- write a new output file
tell application "Finder" to make new file at TheFolder with properties {name:TheName}
set OpenFile to open for access (result as alias) with write permission
write TheText to OpenFile starting at eof
close access OpenFile
on error errmess
try
log errmess
close access OpenFile
end try
end try
end ReplaceMultipleItems
to GetUniqueName for SomeFile from SomeFolder
check if SomeFile exists in SomeFolder, creating a new unique name if needed
parameters - SomeFile [mixed]: a source file path
SomeFolder [mixed]: a folder to check
returns [text]: a unique file name and extension
set {Counter, Divider} to {"00", "_"}
-- get the name and extension
set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
if TheExtension is in {missing value, ""} then
set TheExtension to ""
else
set TheExtension to "." & TheExtension
end if
set {NewName, TheExtension} to {TheName, (ChangeCase of TheExtension to "upper")}
set TheName to text 1 thru -((count TheExtension) + 1) of TheName
tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
repeat while it contains NewName
set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
set NewName to TheName & Divider & Counter & TheExtension
end repeat
end tell
return NewName
end GetUniqueName
to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
displays a dialog for multiple item edit (note that a return is used between each edit item)
for each of the items in SomeItems, a line containing it's text is placed in the edit box
the number of items returned are padded or truncated to match the number of items in SomeItems
parameters - SomeItems [list]: a list of text items to edit
TheTitle [boolean/text]: use a default or the given dialog title
ThePrompt [boolean/text]: use a default or the given prompt text
returns [list]: a list of the edited items, or {} if error
set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
if TheCount is less than 1 then return {} -- error
if ThePrompt is in {true, false} then -- "with" or "without" Prompt
if ThePrompt then
set ThePrompt to "Edit the following items:" & return -- default
else
set ThePrompt to ""
end if
else -- fix up the given prompt a little
set ThePrompt to ThePrompt & return
end if
if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
set TheTitle to "Multiple Edit Dialog" -- default
else
set TheTitle to ""
end if
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
repeat with AnItem from 1 to TheCount -- pad/truncate entered items
try
set the end of TheItems to (item AnItem of TheInput)
on error
set the end of TheItems to ""
end try
end repeat
return TheItems
end EditItems
to ReplaceText of SomeText from OldItem to NewItem
replace all occurances of OldItem with NewItem
parameters - SomeText [text]: the text containing the item(s) to change
OldItem [text]: the item to be replaced
NewItem [text]: the item to replace with
returns [text]: the text with the item(s) replaced
set SomeText to SomeText as text
if SomeText contains OldItem then
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
try
set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
on error ErrorMessage number ErrorNumber -- oops
set AppleScript's text item delimiters to TempTID
error ErrorMessage number ErrorNumber
end try
end if
return SomeText
end ReplaceText
to ChangeCase of SomeText to CaseType
changes the case or capitalization of SomeText to the specified CaseType using Python
parameters - SomeText [text]: the text to change
CaseType [text]: the type of case desired:
"upper" = all uppercase text
"lower" = all lowercase text
"title" = uppercase character at start of each word, otherwise lowercase
"capitalize" = capitalize the first character of the text, otherwise lowercase
returns [text]: the changed text
set SomeText to SomeText as text
if CaseType is not in {"upper", "lower", "title", "capitalize"} then return SomeText
return (do shell script "/usr/bin/python -c \"import sys; print unicode(sys.argv[1], 'utf8')." & CaseType & "().encode('utf8')\" " & quoted form of SomeText)
end ChangeCase
</pre>
Edit: how does the choose from list dialog handle those big strings? I'm guessing not very well - is that why you avoided using them?
Message was edited by: red_menace -
Discoverer 4i not working with Sun JRE plugin
Hi All,
Recently i replaced jinitiator with Sun JRE plugin, after the deployment of the plugins the discoverer is not launching from the form based responsibility.
Its displaying on window as
Applet oracle.disco.DiscoApplet notinited
But i see the document 290807.1 for deployment of Sun JRE its no where mentioned that 4i will not Support Sun JRE plugins.
Any inputs are appreciated
Thanks in advance.Hi,
You can upgrade to Discoverer 10g (10.1.2.3).
Note: 313418.1 - Using Discoverer 10.1.2 with Oracle E-Business Suite 11i
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=313418.1
Note: 459344.1 - What JRE Client Works With Discoverer 10.1.2 and e-Business Suite 11.5.10.2?
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=459344.1
Note: 367389.1 - Recommended Patch for Discoverer 10g (10.1.2.1 / 10.1.2.0.2) Plus Known Issues
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=367389.1
If you are not planning to use Oracle AS 10g features (like Discoverer Connection Management, Discoverer Portlet Provider, and Oracle Single Sign On, ..etc), you can choose to install Oracle Business Intelligence Server 10g Release 2. Oracle Business Intelligence Server 10g Release 2 is available on a separate standalone CD and includes Discoverer Server 10g, Discoverer Plus 10g, and Discoverer Viewer 10g.
Regards,
Hussein -
Within the plugin control panel, you can set which JRE installation the plug-in uses ("Java Runtime Environment" under the Advanced tab). Because of security concerns, requirements, customer relations, etc., our applets require that their .jar files be installed with the JRE. For compatibility and flexibility, we wish to install our "own" version of the JRE, with the jar files, separately from the standard install. The whole thing works if you choose the correct installation in the control panel. We would like to guarantee that the correct JRE is used, rather than hope the customer chooses the correct one in the control panel. Is there an OBJECT tag attribute, or PARAM, that allows you to specify which JRE installation the plug-in is to use?
Just use static versioning as specified at
http://java.sun.com/products/plugin/versions.html -
basically, the object tag using the CAFE... scheme
requires an exact match for the JRE (requires 1.3.1 or
higher to work).Does that not specify the PLUG-IN version, NOT the JRE in the plug-in? We don't need to use, say, plug-in v1.3.1 and v1.4.0, we need to use v1.4.0 but with a specific install of the JRE which is different from the default. We tried having two different installs of the same plug-in, but they didn't work and play well together.
Maybe you are looking for
-
I just downloaded the new version of Firefox and now every site I used to use such as Facebook, Twitter, and Youtube show "This Connection Is Untrusted". Even when I do accept the risks the site no longer looks the way it's looked for years. Twitter
-
HT2731 how to create a free apple id without puttin in the cridit card info?
how to create a free apple id without puttin in the cridit card info? Card type "None" option is not available
-
I just use EditManager.insertInlineGraphic with an URI as source parameter. If i insert image as first character (with firstBaselineOffset = "auto") ,it work perfect . However ,when i try to insert image after some character , the image display with
-
PP/PM Workcenter Integration
Dear Gurus, We have created a maintenance order for an Equipment and it is under break down(Also the PP w/c is assigned to Equipment master ) , but at the same time we are also able to make Production order for that PP work center even though the Mac
-
HI ALL I AM NEW TO SAP RECENTLY JOINED SAP TERP10 COURSE FROM NIIT CHENNAI ITS A ONLINE BASED COURSE JUST STARTED DOING THE COURSE COUPLE OF DAYS BACK JUST WANTED TO KNOW IS ANY ONE DOING THIS COURSE OR ALREADY DONE IT BEFORE HOWS THE COURSE IS IT GO