LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-19-2012, 12:29 AM   #1
WakilNow
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Rep: Reputation: Disabled
Question boot to java app


hi all,
my problem i made java app and I want run this app in the first boot and when it close computer shut down
 
Old 01-19-2012, 06:06 AM   #2
WakilNow
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
UP!!!!
 
Old 01-19-2012, 06:44 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
We'll need to know what distro & version of Linux you have.
Also, how do you invoke the program.?
Does it require access to a screen or GUI?
 
Old 01-20-2012, 04:06 AM   #4
WakilNow
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
thank u chrism01,
i have mint 11 , and I open it by type "java Game.class", and int build in JFrame (Canvas) so it need GUI
thank u again
 
Old 01-20-2012, 10:51 AM   #5
WakilNow
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
up!!!!
 
Old 01-20-2012, 11:11 AM   #6
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
Please don't bump threads by just posting "UP!!!", it's irritating and doesn't persuade people to answer your questions.

I think it would work if you put this into your ~/.xinitrc file:

Code:
(java Game.class; sudo shutdown -h now) &
You would need to check your sudoers file allowed you to run 'sudo shutdown -h now' without a password, or provide some other way for your user to run the 'shutdown' command without needing a password.

Hope this helps,
 
Old 01-20-2012, 11:38 AM   #7
WakilNow
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
thanks for fast reply

Last edited by WakilNow; 01-20-2012 at 11:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java app with plugins brazilnut Programming 1 05-07-2010 05:49 PM
Java Applet to App - Help Please redhatnoob Programming 2 05-03-2004 01:23 PM
java app flickers ianunderwood Linux - Software 1 04-11-2004 05:19 PM
java app as service SuperSadSmile Linux - General 2 12-31-2003 12:39 PM
help with running a java app Soggy Linux - Software 7 11-20-2003 08:57 PM


All times are GMT -5. The time now is 05:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration