467,879 Members | 1,316 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,879 developers. It's quick & easy.

i want to autorun a program

i am autoruning one of my java program but its not working.i first converted the program in the jar file and then write this code in notepad and copy this code in my usb which is below.

[autorun]
open=jarf.jar
action=Run jarf Program
icon=jarf.jar
label=My Portable PC

and saved my jar program in the usb.please help me out
Sep 9 '10 #1
  • viewed: 4173
Share:
6 Replies
Dheeraj Joshi
Expert 1GB
You can not just mention "jarf.jar" in open tag.

I never tried this, but I think it should be like,
Expand|Select|Wrap|Line Numbers
  1. open=java -jar MyJar.jar
  2.  
Also make sure classpath and other things are set.

Regards
Dheeraj Joshi
Sep 9 '10 #2
Nepomuk
Expert 2GB
Hi!

I too have never tried this before, but if it should work you'll have to have the java path in your PATH variable. To test if that's the case, open a command line interpreter (in Windows: Start -> Run -> "cmd", on Linux: Alt+F2 -> "xterm", on OS X I'm not sure of the exact route, but I think it's called "Terminal") and try running
Expand|Select|Wrap|Line Numbers
  1. java -?
If you get an output other than something like "java not found", then it won't be a problem. Otherwise you'll have to edit your PATH variable.

Greetings,
Nepomuk
Sep 9 '10 #3
i also tried this way but its still not working
Sep 9 '10 #4
Nepomuk
Expert 2GB
Have you checked if java is in your PATH variable as I suggested? What was the result?

Greetings,
Nepomuk
Sep 9 '10 #5
when i autorun this or any other file i got a notice that
G:\ not a valid win32 application
Sep 16 '10 #6
Nepomuk
Expert 2GB
Do you have the term "G:\" somewhere in your autorun file, the PATH variable or is the USB drive "G:\"?

Greetings,
Nepomuk
Sep 23 '10 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by M.E.Farmer | last post: by
7 posts views Thread by Peter S. | last post: by
6 posts views Thread by AOECheatmaster | last post: by
8 posts views Thread by Nirav Amin | last post: by
reply views Thread by jack112 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.