• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Boot in java

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How i can start the shutdown pc through the java code or is there anything through which i can start the pc

I have made a scheduler and i want that if my computer is shutdown than when the scheduler time is equal to the normal time my pc will start automatically

How i can do that in java
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to write a program in Java that switches the PC on at a certain time, when the PC is off? That's impossible. You cannot run programs when the PC is off...

PCs have a clock chip on the motherboard, and on some PCs it is possible to make the clock chip give a signal at a certain time to switch on the PC. You'll have to set the switch on time in the BIOS settings.
 
Vivek Moyal
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya you got the right thing now tell me how to get into the bios through bios
 
Sheriff
Posts: 21917
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When your PC starts it shows a short message that tells you which key to press. Usually it's F2, but it depends on the motherboard and BIOS. I've also seen F1, Del and Esc to be the key to open the BIOS screen.

Please be very careful when you change your BIOS settings. Your changes may cause problems if you do not know what you are doing. Always consult the motherboard user manual, and if possible get someone with proper knowledge about computers assist you (or do it for you). When in doubt turn to professionals.
 
Vivek Moyal
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You told me to get into the Bios but i want to excess the bios through my java code so that my scheduler works perfect
 
author
Posts: 23873
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Besides the OS specific API, to some info, power down, etc. Most of the bios menu runs when the OS has not yet booted, or has crashed, so it isn't possible to automate most of the stuff.

Henry
 
Bartender
Posts: 2550
120
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vivek Moyal wrote:How i can start the shutdown pc through the java code or is there anything through which i can start the pc

I have made a scheduler and i want that if my computer is shutdown than when the scheduler time is equal to the normal time my pc will start automatically

How i can do that in java



From a UAT point of view, would you like your pc to turn on by itself at any point of time ?
 
Rob Spoor
Sheriff
Posts: 21917
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vivek Moyal wrote:You told me to get into the Bios but i want to excess the bios through my java code so that my scheduler works perfect


That is most definitely not going to happen. It's simply impossible. The problem is that your Java code just isn't running when the PC is powered off. So how can it do anything?

The only way to power on a PC on request is through Wake-on-Lan, if the motherboard supports it. And these requests have to come from another PC that is already turned on.
 
salvin francis
Bartender
Posts: 2550
120
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its definately possible....

Here is how you do it...
Write embedded java code in a robot lets call him 'Carl'.

Carl should be able to walk to the machine and start it and stop it at the time intervals you want.
Maybe even make coffee when you are tired

Just ensure he knows the important laws (harm no human,obey all times,etc) else there is a chance of him becoming self aware and then......

Try to make carl as least emotional as possible, I mean he should be able to complain occasionally about leading a boring life, etc. But crying is a definate no no.

If you plan to sell carl, let me know...


 
salvin francis
Bartender
Posts: 2550
120
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The answer is no, you cannot start a machine using java without carl.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is this different from the first time you asked this question?
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I wrote before, some motherboards have a "wake on a specific time of day" feature.

However, this is highly dependent on the brand of the motherboard of your computer. Some computers have it, some don't. And if you do have a computer that has it, then I'm not sure if it's possible at all to set the wakeup time programmatically. It certainly will not be possible with pure Java (you will have to write native code to do that).

You'll have to investigate how the interface works to access BIOS-related information, see for example DMI.
 
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
< BIG DISCLAIMER: Test on a test computer, not Java code, no affiliation, DANGER, don't know if it works, may harm your computer beyond repair,....>

CMOSTimer:

"The program CMOSTimer can be used to start a PC from soft off (ATX) mode at a given time.
This is done with the BIOS function "Wake up on RTC Alarm"."



http://www.autohotkey.com/forum/topic20710.html
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is no way to archieve your goals, you can do nothing excluded is to press the trun-off/down key to open the computers
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jan Cumps wrote:http://www.autohotkey.com/forum/topic20710.html


Digging a little deeper, you'll find the link to CMOSTimer: http://www.boraxsoft.de/CMOSTimer_eng.html

It looks like that program was written in Visual Basic. You'll have to convert it to Java yourself. But I don't think you'll be able to do it without writing some native code (in for example C or C++).
 
no wonder he is so sad, he hasn't seen this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic