Batch command for using Java in IE
Hello,
I'm looking for a batch command that sets IE to use Java (Sun).
It should do the same job as if manually checking the check box of 'Use <java version> for applet' in advanced internet options of IE.
Is there a way to do it?
Sorry, currently there's no batch command to set IE to use Java from Sun.
There're quite a few registry keys need to be set when that option is selected.
Registry settings for:
- turning off console for MSVM;
- hooking up Sun's Java console to IE;
- adding a "TreatAs" to the Web Browser Applet Control so that applets with applet tag will use Sun's Java;
etc.
Similar Messages
-
Java commands for using RMI in linux .
Please tell me if the commands for running client , creating stubs , starting rmi registry etc are different in windows and linux .
In linux I got error when I put the command : start rmiregistry . (saying start not a command)'start' is a Windows thing. Try
rmiregistry & -
Batch command to find java version
Hi
I need to get the version of java runtime env on a machine using command prompt (more specifically in a batch file). java -version at command prompt gives me the version and other stuff. But has anyone written a batch file that extracts values like 1.3.1 or 1.4.0 by executing a batch command??
Any suggestions woul dbe helpful
Thanks
VPHere's my thoughtsjava -version 2>tmp.txt //pipe version to file
find "java version" tmp.txt|find "java version">tmp2.txt //just get info
del tmp.txt
for /f %i in (tmp2.txt) do @set version=%i // set a variable
del tmp2.txt
set version=%version:~10,5% // you get offsets
@echo %version%You will need to debug this.
P.S. IS this Java Programming? -
Remotely execute batch commands for AD users?
Alright, so I haven't found this anywhere, but is there a way to remotely execute commands for AD users?Eg. I have a user with an invalid signature in Outlook. I originally wrote up a script that would apply these signatures and set them as default on user logon, but I also made versioning available in my script, and I don't want to create an entire new version just because of a single signature, so instead I would prefer to use a command like "xcopy "\\server\deployed\signatures\%username%\signature.htm" /q /y /z" Is it possible for me to do it remotely?PS.Sorry if the question may sound stupid, I just haven't done something like this before.
This topic first appeared in the Spiceworks CommunityAlright, so I haven't found this anywhere, but is there a way to remotely execute commands for AD users?Eg. I have a user with an invalid signature in Outlook. I originally wrote up a script that would apply these signatures and set them as default on user logon, but I also made versioning available in my script, and I don't want to create an entire new version just because of a single signature, so instead I would prefer to use a command like "xcopy "\\server\deployed\signatures\%username%\signature.htm" /q /y /z" Is it possible for me to do it remotely?PS.Sorry if the question may sound stupid, I just haven't done something like this before.
This topic first appeared in the Spiceworks Community -
Trying to find a way to execute from command prompt using java....
I want to find a way to execute a command from the command line using a java program this is my code:
import java.io.*;
public class SQLHopefully
public static void main(String[] args)
try{
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("cmd /k start cmd.exe");
OutputStream out = proc.getOutputStream();
System.out.println(out);
out.write("test.txt".getBytes()); //I THOUGHT THIS WOULD WORK
InputStream stdin = proc.getErrorStream();
InputStreamReader isr = new InputStreamReader(stdin);
BufferedReader br = new BufferedReader(isr);
String line = null;
while ( (line = br.readLine()) != null) {
System.out.println(line);
stdin = proc.getInputStream();
isr = new InputStreamReader(stdin);
br = new BufferedReader(isr);
line = null;
while ( (line = br.readLine()) != null) {
System.out.println(line);
int exitVal;
try {
exitVal = proc.waitFor();
} catch (InterruptedException e) {
throw new IOException(e.getMessage());
if (exitVal != 0) {
throw new IOException("Exit value was " + exitVal ");
}catch(IOException e)
{System.out.println("ummmmm");}
I hope my code is readable. I am trying to get the command prompt that comes up from the Runtime.exec() to run a file called "test.txt" I know it would be easier to just do it by executing it from java but I want to see if it is possible this way. I thought the out.write would do the trick but I was wrong. Somebody help please....
NateFirst read this article:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Second, you should probably send the Enter key to the shell if you want anything to happen. (Not that I know whether it will work, but I do know it won't work if you don't press Enter.) -
UCCX 8 file paths for using java methods
UCCX 8.0.2SU4
I am trying to use java methods to read an xml file out of the Document repository. I was able to do this in UCCX 7 and prior, but in 8 it seems i need a different file path syntax for the 'java.io.file' variable.
Example:
I would like to do the following:
javaDoc = new java.io.File(/opt/cisco/uccx/Documents/User/default/mydoc.xml)
doesFileExist = javaDoc.exists()
I am not having success with these steps, as the result is always false, even though the file does exist.
any help is appreciated.
thanks,
MikeYour access to the file system is severly restricted. There are security measures in place that only allow you access to the "customer directory". You'll want to use a Create XML Document step to retrieve a file from the document repository using the DOC[/folder/file.xml] syntax. Note the root (i.e. the first forward slash) is the root of the document repository as seen in the /appadmin UI.
Please remember to rate helpful responses and identify helpful or correct answers. -
Help for using java class in forms 9i
hi
i have been trying to use java class in forms9i but unable to execute ,i have encountered exceptions,for which exception handlers have been declared like ora_java.java_error and exception_thrown but failed to handle run time errors , i have tried all ways from my side.
my java class returns a simple string
i need help on various work arounds
thanks in advance
yashsir
i have written a simple java class which returns a string hello imported using a java importer in forms 9i
and i call my class in when button press trigger
i have also imported java.lang.Exception for my exception handlers,i have no compile errors,but when i run my forms i get run time error and my exception handlers fail to trap it . ihave no idea how to proceed .
should i use bean area in form and call the class using fbean from custom item rigger if so please explain
can i get sample code example for calling a java class methods from forms.
thanks
yash -
How to create a batch file for a java program?
I have a java project in JCreator and the project is organised into packages. I have also configured JCreator to provide 2 arguments to the main method when the project is executed.
I would want to create a batch file (.bat) for this project where the batch file can automatically use the arguments set in JCreator when the program runs.
How do I go about creating the batch file?where the batch file can automatically use the arguments set in JCreatorThat all depends JCreator... can you get those arguments somehow?
-
Running command prompt using java
hi guys,
i am still quite new to programming. may i know how to run a bat file or command in the background of the application
without showing the command prompt.
right now i am able to do it, however it will still pop up the command prompt
the following is my coding.
try {
String command = "cmd /C start C:/project/mkiosk/lib/createMovieJar.bat ";
Runtime rt = Runtime.getRuntime();
pr = rt.exec(command);
} catch (IOException e) {
e.printStackTrace();
}xclaim wrote:
...the following is my coding.
try {
Runtime rt = Runtime.getRuntime();
pr = rt.exec(command);
ProcessBuilder is a more robust way of creating a Process.
To avoid problems later, read and implement all the recommendations of [When Runtime.exec() won't|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] *(<- link).*
And as an aside, please put a single upper case letter at the start of every sentence. Adding the capital letter helps people to quickly scan the text, looking for ways to help. You would not want to make it harder to help, would you? -
Executing an hp unix command by using java code
i'm trying to execut the "chmod" command on my jsp as follows :
String cmd = "chmod 644 "+fileName;
Process process;
process=Runtime.getRuntime().exec(cmd);
but i got the following exception:
java.io.IOException: chmod: not found
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:86)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.addShutdownHook(Unknown Source)
at java.lang.Runtime.addShutdownHook(Unknown Source)
at receiveJobAppInput.jspService(_receiveJobAppInput.java:358)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java, Compiled Code)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java, Compiled Code)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java, Compiled Code)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java, Compiled Code)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java, Compiled Code)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java, Compiled Code)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java, Compiled Code)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java, Compiled Code)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java, Compiled Code)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java, Compiled Code)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java, Compiled Code)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java, Compiled Code)
at java.lang.Thread.run(Unknown Source)
can anyone give me a hint why this happend?What about exec'ing this?
String [] {"chmod" ,"644" , "fileName" } -
My code is as the following:
String time = "22/May/2008:00:09:44 -0400";
String strDF1 = "dd/MMM/yyyy:HH:mm:ss Z";
SimpleDateFormat sdf1 = new SimpleDateFormat( strDF1 );
Date d1 = ( Date ) sdf1.parse( time );
System.out.println( d1.toString() );
String srtDF2 = "yyyy-mm-dd HH:mm:ss Z";
SimpleDateFormat sdf2 = new SimpleDateFormat( srtDF2 );
String newTime = sdf2.format( d1 );
System.out.println( newTime );
The output is
Thu May 22 00:09:44 EDT 2008
2008-09-22 00:09:44 -0400
So, you see, the format is correctly changed, but the time is wrong.
Please help...
Thanks,
Paul
Edited by: paulur_lee on Aug 8, 2008 10:28 PMyou are right
Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800
http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html -
How to execute external spawned process using java
Hi,
I am executing PGP from command line using java.
For adding the public key I use Runtime object like this
Runtime rt = Runtime.getRuntime();
Process process = rt.exec("pgp -ka "+"d:/Mangesh/pubkey/sandy.asc "+"C:/PROGRA~1/NETWOR~1/PGPNT/keyrings/pubring.pkr");PGP is executing this but inbetween it asked for confirmation "Do you want to add public key (y/n)"
I am providing data to process this way:
PrintWriter pw = new PrintWriter(new OutputStreamWriter( process.getOutputStream()));
pw.write('y');
pw.flush();But after this their is no execution from PGP and console remains until I closed it.
PGP is waiting for ENTER KEY
How can I provide ENTER KEY from java
This is right method ??? or any other options are available??
I am awaiting for your valuable suggestions .
Regards
Man479On Windows the "enter key" consists of two characters: carriage return and a line feed (\r\n). You may have to send both. If that doesn't work, pgp is not reading the reply through stdin, only through the console, and there's no way to pass the 'y' to it through Java.
-
How to change heap memory size for general java applications (not applets)
Hi. I made a java class which manipulates images and I sometimes get an out of memory error when the files are large. In these cases I can run it successfully from the command line using:
java -Xms32m -Xmx128m myappbut as I run this class from a firefox extension, I can't use this technique.
Could some one tell me how to set this globally? I've found a lot of info on setting it for applets in the control panel but that's it. I also tried editing my deployment.properties file by adding:
deployment.javapi.jre.1.6.0_11-b03.args=-Xmx128mbut none of these options seem to work.
Thanks for any help.Also you can use use [JAVA_TOOL_OPTIONS|http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#tooloptions], with more documentation here. JAVA_TOOLS_OPTIONS is available since 1.5. There is no direct documentation on [_JAVA_OPTIONS|http://java.sun.com/j2se/1.5.0/docs/guide/2d/flags.html] but was made available since at least 1.3.
The recent existing forum thread [Java Programming - How to change the default memory limits for java.|http://forums.sun.com/thread.jspa?threadID=5368323&messageID=10615245&start=36] has a long discussion on the issue.
You specified you are not using applets, but if you do, I would also suggest you use the next Generation Plug-in (since 1.6.0_10) that allows you specify the max memory in the applet without having to instruct the user how to make the change. See [JAVA_ARGUMENTS|https://jdk6.dev.java.net/plugin2/#JAVA_ARGUMENTS] for applets. Java Webstart uses resources. -
Batch CMD for migrating reports 6i to 9i
We are converting Oracle reports 6i to 9i(Oracle 10g) (we have approx 1000 reports to be converted).
Let me know the batch command for converting reports 6i to 9i.
Appreciate your feedback.
RajFor what it's worth, I just had to go through the same exercise and put together a little Perl script.
#!/usr/bin/perl
# Pass the starting directory(ies) as command line arguments
# For all RDFs under the starting directory this will generate an ASCII source file (REX).
# The tool RWCONVERTER.EXE must be in the path and the SID must must be reachable. You have to populate USERNAME,
# PASSWORD, and SID
use warnings;
use diagnostics;
use File::Find;
# Default is to start in current directory and convert files to source
unless ($filetype = shift) {
$filetype = "rexfile";
if (uc($filetype) ne "REXFILE" and uc($filetype) ne "REPFILE" and uc($filetype) ne "JSPFILE") {
die "Usage: $0 [REXFILE | REPFILE | JSPFILE] <directories to recursively search>";
@ARGV = "." unless (@ARGV);
$fileext = substr( $filetype, 0, 3);
sub convert_reports {
return unless /\.rdf$/i;
(my $destFile = $_) =~ s/rdf$/$fileext/i;
my $cmd = "rwconverter stype=rdffile userid=<USERNAME>/<PASSWORD>\@<SID> " .
"source=$_ dtype=$filetype dest=$destFile batch=yes";
print "$cmd\n";
system $cmd;
find(\&convert_reports, @ARGV); -
How can I batch process Save For Web (from 300 dpi) in CS6?
Hi Rhondavous1,
Although not exactly what you are asking, I would recommend just using the Image Processor instead. It seems odd to me that you would want to use (save for web, for use on the web) and (300 dpi, usually for printing). You could create an action that goes through the appropriate save and resample commands and then use the Batch command but using the Image Processor is easier.
These might help:
http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-7427a.h tml
Little dated but still useful if you are not familiar with Image Processor
http://av.adobe.com/russellbrown/ImageProcessorSM.mov
-Dave
Maybe you are looking for
-
How to delimited text file data being downloaded in Application server
Hi All, How to delimited or having a tab between each fields in the data being downloaded to Application server. Please provide an example of code or how i should make changes to my below coding. Thanks. eg. the out file in application server. Field
-
3D surface plot export _ missing scale on the projection​s
Hi all, I am using 3D surface plot subvi in LabView 2010 SP1. After plotting the data, I can export the images (.bmp, mata file etc.). While exporting the projections of the images, I am not able to get the axis scales on them, though when I export
-
Getting duplicate records in cube from each data packet.
Hi Guys, I am using 3.x BI version. I am getting duplicate records in cube. for deleting these duplicate records i have written code. still it is giving same result. Actually i have written a start routine for deleting duplicate records. These duplic
-
How can I stop my SSD from detecting my applications on my HDD?
I just installed a SSD as my primary drive, and removed my optical bay and moved my HDD to that slot. I installed Yosemite on my SSD and everything is working fine, except that the Mac App store detects the applications on my HDD and keeps opening th
-
Hi, I am planning to use a single Timer to generate PWM PULSE, Pulse ON time measurement, Event time measurement1,Event time measurement2 some one please suggest me how can I achive this. Thanks in advance.. Michael