Explain how to run a jar file in Openscript in OATS.
Hi..
I have a jar file which essentially compares two files.I want to run it from Openscript. Please explain me the steps in detail (after adding in the assets field)
Thanks in advance
regards
Harsha
Hi,
If you know the class name in that jar file create an object for that class and invoke function you needed.
Regards,
Deepu M
Similar Messages
-
How to run a jar file in JBuilder
Hi there
I need to know how to run a jar file using JBuilder. Thanks :)
Countesswell i have a german version of jbuilder and there it is under
experten Archiv-builder
look at something that has a similar name -
How to run a JAR file in Unix system?
hi there
ca anyone tell me how to run a JAR file in unix system or X window, thank youYou want to create an executable JAR file? You do it in the following way.
Create a manifest file such as manif.txt and the contents should contain
Main-Class: foo
assuming foo is the name of your main class. Then create the jar as follows
jar cvfm foo.jar manif.txt foo.class
I hope that helps you!
you can find more info here http://java.sun.com/docs/books/tutorial/jar/ -
hi
can anybody tell me how to run a jar file in java,is there any need to unzip a jar file before running it?
Thanks in advance.Set the classptha, if you want to run it by double clicking.
I assume that you know, how to set the classpath.I though that if it is an executable jar, the classpath environment variable will be completely ignored. Are you saying something to the contrary? -
How to run a jar file in a browswer?
Hi, everyone:
I got a problem here. I would like to run my jar file in a html-based brower, should I write another applet for my jar file? How can I do that? (I don't have applet in my jar file, but only JFrame) Is there any way I can put a runnable jar file into an applet and show on the brower? Could anyone show me how to write this code? Thank you very much!!
-jxchouAt first you need a java plug-in for your browser.
Next you have to implement an applet in your jar-file.
The tag in your html-document should look like:
<applet code="Sample.class" archive="sample.jar" width="400" height="400"></applet> -
How to run my jar file on a webserver
hello everybody,
I've created a chat aplication which consists of a client-side and server-side. The client-side is an applet and is working fine. But i'm getting problem with the server-side. Actually, it is working fine on my local system and even in a local area network. But now, i want to put the server-side on a webserver. So, i want to know how can i do that. My server-side is a jar file "chatserver.jar" which i've developed using frame containers. I want to know also how to run the chatserver.jar on the webserver. Is it that i should have implemented jsp? Or javascript? coz my chatserver must be always running 24/7. It must not be available to user. users will chat through applets and the data will be sent to the server-side which will in turn control and recognise those data. Can anyone please help me in that issue.that was very kind of u for replying to me. thanks a lot. Well, the web software i'm running is nothing soo great but it's simply a chat server side application. In this application, i'm using a thread where my datagram socket will keep on receiving data from clients and this server side apllication must response to the client. For example, if a client has added a new room, or a new user has logged in, the server side must take care to inform all other clients that a new user has just logged in or a new room has been created. The main method is in the "chatserver.class". Then, i've combined all my classes including the chatserver.class into a jar file. When i click on the jar file on my local system or on the server of a local area network, it works beautifully. So, my server side application works like that. I have to click on the chatserver.jar once and nothing else. No other interaction with the applicaion. But my problem is how to run it on a web-server like apache. Or even if i upload this software on a website, how do i make it run? Shall i implement jsp codes? If yes, how to execute such jar file using jsp?
here are part of the codes where my datagramsocket is receiving message from clients:
public void run()
while(thread!=null)
byte[] recbuf=new byte[65536];
recpacket=new DatagramPacket(recbuf,recbuf.length);
try{
servsocket.receive(recpacket);
if(servsocket==null)
byte[] bt=recpacket.getData();
String recvmess = new String(bt, 0, recpacket.getLength());
InetAddress clientaddress=recpacket.getAddress();
int clientport=recpacket.getPort();
chatcom=new chatcom(this,clientaddress,clientport,recvmess);
try{
thread.sleep(10);
catch(InterruptedException _INExc)
chatcom is another class which i've created to differentiate if the data received is a message, new room, new user, etc... I've created my own RFC to make those differences. Like i said above, if a client has created a new room, the chatcom class will recognise that a new room has to be created and will therefore send the new room created to all other clients. So, i want to know how to get my "chatserver.jar" run on a web server like apache or even on a website if i want to upload this software. Coz once it starts running, i dnt hav to close the application. I mean to say that this application will have to run 24/7. Do i have to execute it externally using jsp codes? Is there any way to get my application run on a webserver? -
Hello,
I got a java jar file which contains folders with class file. When I double click on the jar file, it gave a error
Exception in thread "main" java.lang.NoClassDefFoundError
How can I run this jar file?
Thanks,
CRHello,
I got a java jar file which contains folders with
class file. When I double click on the jar file, it
gave a error
Exception in thread "main"
java.lang.NoClassDefFoundError
How can I run this jar file?
Thanks,
CR... and assuming that Jar contains a manifest file, what does it look like? I would guess that the Main-Class entry is incorrect, or that the Jar has external dependencies to other jars not listed properly in the Class-Path entry. -
How to run a jar file using Java application.
Hi all,
I know that jar file can run using the following command, using the command prompt.
java -jar jar-fileBut I don't know how to run that command through a Java code. Hope it's clear to you.
So can you please explain how can I do it.
Thanks,
itsjavarayon.m wrote:
The solution given by ropp appears to have nothing to do with what you asked about.Ok sir, I got the point.
I've try a test as follows. But it doesn't give any output. Even not an exception.
try {
String[] temp = new String[]{"java", " -jar", " MainApp.jar"};
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(temp);
int exitVal = proc.waitFor();
System.out.println("ExitValue: " + exitVal);
System.out.println("Temp_Values");
catch(InterruptedException ex) {
System.out.println(ex.getMessage());
catch (IOException ex) {
System.out.println(ex.getMessage());
}I've debug and see, but the exitValue is even not exist at run time. Can you tell me where I'm going wrong. -
Can anyone explain how they made this Jar file
Hi all,
I have searched the forum without luck. Lots of people asked questions about protecting their jar files but almost everyone said to either use exe file or use obfuscators.
But how can I make my jar so it is not possible to open it or when you try to open it you get nothing.
For eg. jar -tvf myjar.jar returns nothing and no error message.
I am also going to go one step ahead and give you an example of such a jar file you can download from the net to check it out yourself what I mean.
Go to the following site and download the exe file by clicking on the download cluster link
http://support.novell.com/servlet/filedownload/pub/drsapuserir1.exe
Open command prompt run the exe....accept the license and it should extract couple of files one of which is a jar file called sapusershim.jar
Try to open it with winrar, winzip or jar utility. You won't be able to. But I know for sure the jar is not corrupted because I use it in my application at work. This is not the only example of such jar file I have experienced.
So now we all know it's possible. But I would really like to know how.
Regards,
Hiten.By definition, if the jar utility program won't operate correctly on the jar, it is corrupted in some manner and no longer standard.
-
How to run a Jar file during runtime
Runtime.getRuntime().exec("javaw -jar MYJAR.jar");was what I used to run the jar originally, and it worked. Recently I created an installer for my program, where the user runs a batch-file shortcut which launches the main application. Because the main application is launched from the desktop, rather than directly, the "user.dir" property is different which makes the above code not work. How do I get the name of the folder that contains the running java application?
ThanksYou don't. You fix the installer so that it puts the correct working directory into the shortcut that it creates.
-
How to run a jar file in a HTML page.
Hi, i have created an applet that works with 2 or 3 classes, the i have done a Jar file and now i want to run the applet though a Html page, i have looked at many manuals and i have done the same as is said to create the Html file, but whe i want to see the page on the part of the applet nothing appears to me and when i go though the area of the applet with de mouse an error message apears saying that the clas XXXX (the main class of my applet) can't be instanced.
Could someone tell me why is this? i need help or to see an example that works.
ThanksHi, i have created an applet that works with 2 or 3
classes, the i have done a Jar file and now i want to
run the applet though a Html page, i have looked at
many manuals and i have done the same as is said to
create the Html file, but whe i want to see the page
on the part of the applet nothing appears to me and
when i go though the area of the applet with de mouse
an error message apears saying that the clas XXXX (the
main class of my applet) can't be instanced.
Could someone tell me why is this? i need help or to
see an example that works.
ThanksUse the archive parameter in the applet tag.
e.g: <applet code="your_main_applet" width="256" height="256" archive="myjar.jar">
Where myjar.jar is the actual jar file which contains all the user class files which are required to run this applet.
For creation of jar files, please read the java tutorial in http://java.sun.com
/Sreenivasa Kumar Majji. -
How to run exe (jar) file in java?
hello,
i can retrieve jar file but can't run from outside of JBuilder ..why?
can u help me, pls?
nway ngeMultipost.
-
How to run a jar file which needs another jar to be in the class path
Hi,
I need to execute a jar, which needs another jar to be in the classpath.
If I run like
java -classpath <jar1 name> -jar <main jar>
It is giving classnotfoundexception, where as the class is available in the <jar1 name>.
so, currently I am doing like this
In the manifest file i have given like
Main-Class: <class name>
Class-Path: <jar name> <jar name2>
then it is running fine. But, if I want to change the jar location again I need to changed the manifest file.
Is there any way to do this? Pls help me.How about
java -cp jar1.jar;jar2.jar com.acme.MainClass
You won't need to worry about the manifest file after that and you can make a bat files (or .sh file in *nix) for it. -
How to make a jar file downloadable with IE
hello,
I just bought a website:
http://www.frozenfountain.net/
and I put a jar file on it called Logo.jar
Using Mozilla, the jar file downloads as expected, but with Internet Explorer, it tries to download it as .zip file.
How do I get it to download as a .jar file with IE?
thanksJust post a link to the Jar. Mozilla will download
it as a jar. Windows will download it as a zip.
Only one link. No problem, really. ;-)There is a problem. People who arent as good with computers as you are won't know how to run the jar file after downloading with IE.
At school, I told someone to download the file, which they did with IE. It downloaded to desktop as a zip. They extracted and were left with a bunch of .class files.
On a sidenote, how do you draw text with a gradient? -
Run a JAR file!!!
How to run a JAR file....
you need to specify the
Main-class: your class contains main method here
attrbute in Meta-inf
nd you can run usinf
java -jar yourjar.jarThe question was not, "How do I create a manifest file that will allow me to run my jar file?" It was simply, "How do I run a jar file?"
Maybe you are looking for
-
Problems with Windows install and erasing Boot camp partition.
I recently decided I'd try running a copy of XP on my Macbook, the only reason being that the software for my OU work is only available on Windows. I used Boot camp assistant to partition my hard drive which went smoothly. When I tried to install Win
-
Hi I'm missing several events in my iPhoto library following my last import. If I open up Aperature to access the library I see all of my events, does this mean my library is corrupt? I've already tried repairing the iphoto database, rebuilding the
-
Extended Withholding Tax - Business Place
In Version 5.0,when we are trying to create withholding tax challan(vendor),the system is giving the message as no business place for doc.type is created. can u pl. clarify in this reg. Awaiting for your reply. Thanks
-
Ipod randomly skipping to the end of songs
when playing certain songs on my ipod (5th gen 60gb), the song will play fine until there are about 45 seconds left, at which point the ipod will skip until there is one second left, and freeze for about a minute. this problem does not occur when pla
-
No Internet available for TV or Blu Ray systems - new problem
I am unable to connect any TV or entertainment device to the Internet - Samsung TV, Samsung Blu Ray / Entertainment system, and Sony Blu Ray / Entertainment system. All 3 of these devices have a good connection to my Apple Airport AND my FIOS router,