Help me In Running JAR file
my previous post was supposed to be hacked or a spammer did something wrong with my original text.
so i repeat my question here again:
Hello,
I made a program in java which involves 7 java files and some pictures.
Then I made a jar file through this command:
jar cmf manifest.mf sample.jar .
where the manifest file was like this:
Manifest-Version: 1.0
Created-By: 1.6.0 (Sun Microsystems Inc.)
Main-Class: test1
But when I double click my sample.jar it shows nothing(!!!!!!)
im loosing my temper.
can anyone say what is the solution of my problem
best regards
tanvir
<h2>This was the response</h2>
RS_Tanvir wrote:
maple i used WINRAR and checked already that everything there was correct
im totally confused...{color:red}Abuse has been reported on dfasdfsdafsadfasdf in another thread for misuse of html formatting to cover the posts of other members with samples of his/her brain tissue, otherwise known as cr@p.{color}
{color:@000080}db{color}
Similar Messages
-
After your advice in the same forum I was able to create a JAR File from a single file but somehow it has got associated with VC++.........When i double-clicked on the JAR File it gave me list of programs fomr which i hadd o chose to run the JAR file. I guess I chose VC++. ANd now the JAR file opens in VC++ Showing all binary stuff which I don't wnt to see. How do I remove this association and run the JAR File like a proper EXE file.................
Please HELP SOON.........
THANX........What system are you running? You might try searching the forum.
-
hi there
i wanna create a exe file so i am trying to use jar file.
I am new at creating jar files, my application has a main file and other java files, i am using other java files in my main file my concern is can i create a jar file including all the files and when i run jar file i want to complie java files, i really appreciate if anyone can help me out creating a jar file to compile and execute java fileshttp://java.sun.com/j2se/1.4.2/docs/guide/jar/index.html
-
Problem running jar files of java in Linux
I cannot run jar files in java/jdk1.3.1_01/demo in Readhat Linux 6.2
The command is :--
[root@localhost Notepad]# java -jar Notepad.jar
java.lang.NoClassDefFoundError: javax/swing/JPanel
at java.lang.Class.forName(Class.java:33)
at kaffe.jar.ExecJarName.main(ExecJarName.java:58)
at kaffe.jar.ExecJar.main(ExecJar.java:61)
[root@localhost Notepad]#
My ~/profile setting is :---
PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3.1_01/bin:/usr/java/jdk1.3.1_01/jre/bin:/usr/java/jre/lib"
export JAVA_HOME=/usr/java/jdk1.3.1_01
export NPX_PLUGIN_PATH=/usr/java/jdk1.3.1_01/jre/plugin/i386/ns4[root@localhost Notepad]# java -jar Notepad.jar
java.lang.NoClassDefFoundError: javax/swing/JPanel
at java.lang.Class.forName(Class.java:33)
at
at
at kaffe.jar.ExecJarName.main(ExecJarName.java:58)
at kaffe.jar.ExecJar.main(ExecJar.java:61)
[root@localhost Notepad]#
My ~/profile setting is :---
PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3.1_01/bin:/u
r/java/jdk1.3.1_01/jre/bin:/usr/java/jre/lib"
export JAVA_HOME=/usr/java/jdk1.3.1_01
export
NPX_PLUGIN_PATH=/usr/java/jdk1.3.1_01/jre/plugin/i386/n
4Add the line:
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar
Then, run the command "source ~/.profile" and then the jar file should be able to run.
Bhav -
Error messege when run jar file
when i run jar file of my project give me that error(Fatel exception occured.program will exist)
what is the reason of that error"can't get that path". Sounds like requisite classes aren't on the classpath.
Please paste the ENTIRE error message that it's producing into your next reply. You have probably forgotten to include necessary classes - perhaps a JDBC driver - in your JAR file. -
I created a game and I need help on creating a jar file.
I know the basics such as having a root folder, a manifest file and what goes in it, etc. And I know some programs like JGrasp can do the jar file for you, but it tells me it cannot find the main class. Does anybody know another program that can do that for me, or can i easily do it manually?
any help is appreciatedYou can use jar.exe to create jar files.
Just type jar and hit enter on the console it will give the help message about parameters.
if you do not really need to put any spesific menifest information. Just zip the files using some zip software and change the extenction to jar. (Thats what I am doing most of the time) -
Console not display when run jar file
i run jar file with command javaw -jar test.jar or double click on jar file, it's console app, it just run well but console not display, can i made console display and when i close console, it's stop jar file too?
thanksi got it, javaw = no console window, i tried java command and i got error: can not access jar file?
-
Help with a question about making/running .jar files.
First i have a question, can i make a .jar file that can run on a computer without JRE installed. And if i can, how do i make it. I have tried to make it on my computer, that has JRE but i keep getting the error when i run it: Exception in thread "main" java.lang.NoClassDefFoundError: Sample\FileSearchAnd im using the command:
jar cvfm jarname.jar directory\manifest.txt directory\FileSearch.class directory\FileNode.classIt says it creates the .jar but is unable to run it.dford425 wrote:
First i have a question, can i make a .jar file that can run on a computer without JRE installed. No, not unless you package the JRE with your dist. Hence the name JRE (Java Runtime Environment).
And if i can, how do i make it. I have tried to make it on my computer, that has JRE but i keep getting the error when i run it: Exception in thread "main" java.lang.NoClassDefFoundError: Sample\FileSearch
That simply means your not pointing the runtime to the classes. Set your CLASSPATH environment variable correctly and it will run (given you have a JRE which it appears you do).
And im using the command:
jar cvfm jarname.jar directory\manifest.txt directory\FileSearch.class directory\FileNode.classIt says it creates the .jar but is unable to run it. -
Unable to run jar file without lib folder containing swing-layout-1.0.jar
I have done my project through NetBeans 5.0. Eventhough I have copied my lib foloder containing swing-layout-1.0.jar inside my project.jar, I am still unable to run my project.jar in other systems, it is creating an error as Could not find the main class. Program will exit. But if I copy the lib foloder containing swing-layout-1.0.jar in the same path as the project.jar, then my project.jar is running.
But I want to give only the project.jar for other users and not also lib foloder containing swing-layout-1.0.jar each time.
Could someone please help me with this.When you develop GUI applications using the Netbeans you may endup using netbeans specific jar files in your auto generated code.
And when you build jar files with netbeans it copy the third party jar files used in a application in to a lib folder in the same directory as the jar file of your project. And then set a class path entry to those jar files in your project jar file's manifest file.
So if you want to redistribute the package you have to redistribute your jar file and every thing in the lib folder in with the same directory structure.
If you want to change the structure you will have to change the class path to suit the new structure. -
Getting error while running jar file
Hi,
I am getting below error while running the jar file
"Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdeveloper/layout/XYLayout:"
I have created a simple ADF desktop app in which i am displaying the frame.I created the jar from Jdeveloper.
Please help..How do you run the jar file? Take a look at this thread for a possible a solution: Re: deploying a jdeveloper adf application to a desktop
Is the class XYLayout packaged or referenced? Take a look at this thread: XYlayout classes - can I distribute with my code? -
Running Jar Files created in Sun Java Studio
Hi everyone,
I am still trying to explore the functionalities (especially as regards deployment issues) of this robust IDE. However I do have a problem. I have developed a very basic program that connects to a database (MSSQL) using Java Studio 8. However after building the jar file, if I try to execute the jar file it gives me this message
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver.....
But all goes well within the IDE and it runs well if I use my notepad or vi editor,compile it from the command line and execute the generated class file. The classpath have been set for all the necessary jdbc jar files.
Any Help Will Be Appreciated1. Sun Java Studio Enterprise 8 is based on NetBeans 4.1 which does not provide direct support for packing an application. One alternative you may want to consider is to use NetBeans 5.0 (http://www.netbeans.info/downloads/download.php?type=5.0) or JSE 8.1 which is based on NB5.0 and which is now in beta (http://developers.sun.com/prodtech/javatools/jsenterprise/downloads/index.jsp).
You may want to refer to http://www.netbeans.org/kb/articles/javase-deploy.html for packing and deploying a standalone application is NB5.0 or JSE8.1.
2. Using JSE8, you may want to try copying all the library jars (including database drivers) used by your application to your projects dist directory manually and then package them all into one jar.
3. You should not have to know the exact location of the jdbc jar on the client machine. How are you instantiating the driver in your code? Are you using 'Class.forName()'? If so, java should be able to pick up the driver from the classpath. (Pl. ref to http://forum.sun.com/jive/thread.jspa?forumID=122&threadID=62696, which may be of help). -
Help -- Trying to create JAR file but not working
Hi everyone
I have created a rather noddy Java program that consists of 4 JComboBox's and 1 JButton on a JFrame.
When the button is clicked a text file is generate with the options that have been selected.
There are severial files that the program uses for this:
gcc.java
OutToFile.java
gccConfirm.java
MyNewWindow.java
main.java
I am using Jcreator and so must use the command line to create the Jar file.
I have never done a jar file before so I did an example with a hello world program and got it working now problem. I did the same for this program and the JAR file is generated without error. I double click on the JAR file to run the application, but nothing happens. I can see the application running in memory but nothing loads on the screen. However if I run it from the command line using Java -jar gcc.jar then everything is ok.
can anyone help me here?
thanks in advanceIf you run you .jar from the command line (a shell in unix speak) there
already is a console where your java program can send it's System.out
stuff. Right click on your .jar and select 'properties' (or similar). Note
that your .jar is run by 'javaw'. This executable is similar to the 'java'
executable except that it doesn't open a console for you. Change the
'javaw' command to 'java' and voila, there's your console again.
kind regards,
Jos -
Help! problem running .bat files in browser
HI! Hope you can help me!
I have a simple applet that runs .bat files and retrieves the resulting information into a text box.
To run those files I use:
Runtime rt = Runtime.getRuntime();
Process processo=rt.exec("C:/po2PrtMonitor.bat 04600105 ope >C:/infoPrt.txt");
in wich "04600105","ope" and ">C:/infoPrt.txt" are parameters that the .bat file is expecting. When the file is ran it saves the resulting information on a simple .txt file, that I later read by using:
fichResposta = new FileInputStream(fichRespostaPath[0]);
When I run my applet on JDeveolper 9.0.2.822 is works perfectly, the problem is when run it on the browser.
On the browser the applet executes the file by opening a MS-DOS prompt and when it finishes executing the file, the prompt closes automatically and doesn't send the information into the .txt file.
My .bat file is something like:
jre -cp PrtSrv20.jar sibs.deswin.prt.PrtMonGateway 10.46.1.22 5003 %1 %2 %3
where %1,2%,3% are the above parameters given by the applet when the file is ran.
If I run it on JDeveloper I get:
C:\>jre -cp PrtSrv20.jar sibs.deswin.prt.PrtMonGateway 10.46.1.22 5003 04600105 ope
PRTSES=04600105 HDR=0460010000000005 STA=OPENED TRF=ACTIVE TRP=CONN ILTS=15 Long postings are being truncated to ~1 kB at this time.Here is what is missing:
ILT=0 MSQ=388 HDR=04.60.01.00.00.00.00.05.41.00.01.84. CMD=STRT-TRF
When the applet is run on the IE broser what I get is simply:
jre -cp PrtSrv20.jar sibs.deswin.prt.PrtMonGateway 10.46.1.22 5003 04601005 ope
I have no idea as to what the problem might be! Do native methods work differently on the browser?! Could it be a problem on the deployment? A library not included on the deployment profile? Suggestions are very welcome.
Hugo Rosas -
Running .jar files from Java code
Hi.
I am designing a sort of platform to run some games which are saved in .jar files. Basically this platform is a menu from which the user can select the game which he/she wants to run. It also has the feature of adding new games.
Is is possible to run the .jar file from within java code?
Thanks for any help!
Krt_maltaJust list the jar in the classpath list and call the class in the jar.
-
URGENT Help for applet with JAR file in Netscape
I am having Applet with few classes
Html is in /www directory
and all class files are in /www/javaclassfiles
I jared all javaclassfiles with following command
c:\www\javaclassfiles>jar -cvf sample.jar TaxPaymentAppletForm.class *.class
where sample.jar is my jar file and TaxPaymentAppletForm.class is the main applet class file.
THEN I DELETED ALL CLASS FILES & KEPT ONLY SAMPLE.JAR FILE ON SERVER
My html code is like below:
<APPLET CODE="TaxPaymentAppletForm" ARCHIVE="sample.jar" CODEBASE="JavaClassFiles" WIDTH=460 HEIGHT=400></APPLET>
The things are running on IE properly, but not on Netscape. Netscape is giving following error :
java.io.IOException: <null>
at netscape.net.URLConnection.connect(Compiled Code)
at netscape.net.URLConnection.getInputStream(Compiled Code)
* at netscape.applet.AppletClassLoader.grabArchiveFile(Compiled Code)
at netscape.applet.AppletClassLoader.openArchive(Compiled Code)
at netscape.applet.AppletClassLoader.openArchive(Compiled Code)
at netscape.applet.AppletClassLoader.<init>(Compiled Code)
at netscape.applet.AppletClassLoader.getClassLoader(Compiled Code)
at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
# Unable to load archive http://nearbuy_server:90/iras/JavaClassFiles/sample.jar: java.io.IOException: <null>
# Applet exception: class TaxPaymentAppletForm could not be loaded
# Applet exception: class TaxPaymentAppletForm could not be loaded
# Applet exception: class TaxPaymentAppletForm could not be loaded
In netscape also it is sometimes running some times not, without any logical reson.
Any help regarding this is appreciated
manishaFollowing is the more detailed analysis when applet is running and when not
On local server, it is running fine on both IE / Netscape
When I transfered jar file to live server
On IE it is running for the first time and then onwards not running, If I clear the catch then again applet is running.
For second time it is giving following error :
IOException Loading Archive: http://dev1.janusx-collections.com/iras/JavaClassFiles/AppletForm.jar
java.io.IOException: dev1.janusx-collections.com:80//iras/JavaClassFiles/AppletForm.jar
at com/ms/net/wininet/http/HttpInputStream.connect
at com/ms/net/wininet/http/HttpInputStream.<init>
at com/ms/net/wininet/http/HttpURLConnection.createInputStream
at com/ms/net/wininet/WininetURLConnection.getInputStream
at com/ms/vm/loader/JarArchiveSet.loadNextJar
at com/ms/vm/loader/JarArchiveSet.getResourceBits
at com/ms/vm/loader/JarArchiveSet.getClassData
at com/ms/vm/loader/ResourceLoader.getClassData
at com/ms/vm/loader/URLClassLoader.findClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
java.lang.ClassNotFoundException: TaxPaymentAppletForm
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
ON Netscape it is NOT running at all on from live server and error is as given in above first post.
manisha
Maybe you are looking for
-
hi when iam using t code F-07 out going payment.iam getting there are no open items managed in account 250001(rental account) iam unable to post.
-
MIDI device to start / stop playback ?
Hi again, 2nd post We're using GB as our sound processor for keyboard parts in our "band". Now, since I suck at singing and playing keyboards at the same time, I'd like to pre-program synth tracks, and have the ability to start and stop the tracks us
-
Videos (of any kind) will not play in Safari
Okay, this has been bugging me for about two months now! Videos of any format will not play in Safari. Anything flash (Youtube for example) OR anything Quicktime (mpg, avi, mov, mp4) refuses to even show up when I try to view them. I go to a Youtube
-
I need to recover all of my music and apps
This happened after my computer sent my itouch into recovery mode. PLZ HELP!!!
-
How can I implement FTP feature in WLS???, I mean,,,, How can I make download or upload with WLS.???