Skip to content

Commit

Permalink
rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecdcaeb committed Jan 18, 2024
1 parent d3a77df commit 2cf4e1b
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions JDKSwitcher_forWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,29 +366,18 @@ void readFromConfig(std::vector<std::string>& jdks){
return;
}
}
void printLICENSE(){
std::ifstream lic("LICENSE");
if(lic.bad()){
tellraw("&r Error:LICENSE not found!");
}else{
std::string buf;
std::string line;
while(std::getline(lic,line)){
if(!line.empty()){
buf+=line+"\n";
}
}
buf=buf.substr(0,buf.length()-1);
printf("%s",buf.c_str());
}
lic.close();
void printMainScreen(){
tellraw("&aJDK Sitcher\n");
tellraw("&a Copyright (c) 2024 Hileb\n");
tellraw("&a this is a Software enable you change the \"JAVA_HOME\" fastly.\n");
printf("Current JAVA_HOME : %s \n",quoteString(getJava())->c_str());
tellraw("\n\n&yChoose your jdk(in C:\\Program Files\\Java\\ or jdks.cfg each line) \n");
}

int main(){
//pre Launching
SetConsoleTitle("JDKSwitcher");
printLICENSE();
tellraw("\n\n&yChoose your jdk(in C:\\Program Files\\Java\\ or jdks.cfg each line) \n");
printf("Current JAVA_HOME : %s \n",quoteString(getJava())->c_str());
printMainScreen();
//launch
std::vector<std::string> jdks;
readFromConfig(jdks);
Expand Down

0 comments on commit 2cf4e1b

Please sign in to comment.