LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-18-2012, 11:29 PM   #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, 05:06 AM   #2
WakilNow
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
UP!!!!
 
Old 01-19-2012, 05:44 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 03: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, 09:51 AM   #5
WakilNow
LQ Newbie
 
Registered: Jan 2012
Posts: 5

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

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
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, 10: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 10:39 AM.
 
  


Reply



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 04:49 PM
Java Applet to App - Help Please redhatnoob Programming 2 05-03-2004 12:23 PM
java app flickers ianunderwood Linux - Software 1 04-11-2004 04:19 PM
java app as service SuperSadSmile Linux - General 2 12-31-2003 11:39 AM
help with running a java app Soggy Linux - Software 7 11-20-2003 07:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:05 PM.

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
Open Source Consulting | Domain Registration