Click here to Skip to main content
15,867,986 members
Home / Discussions / Java
   

Java

 
GeneralRe: How to put the condition if the array may be empty? Pin
Cris29M26-Nov-22 4:53
Cris29M26-Nov-22 4:53 
QuestionAddress Book System Help Pin
Ghost 717-Nov-22 19:19
Ghost 717-Nov-22 19:19 
SuggestionRe: Address Book System Help Pin
Richard MacCutchan17-Nov-22 20:38
mveRichard MacCutchan17-Nov-22 20:38 
AnswerRe: Address Book System Help Pin
CHill6018-Nov-22 0:02
mveCHill6018-Nov-22 0:02 
QuestionTravel Salesman Problem find itinerary with highest visited sites attractiveness score Pin
Faroug Tifratene16-Nov-22 0:36
Faroug Tifratene16-Nov-22 0:36 
QuestionJavaFX ScrollPane scroll child to bottom Pin
MVSoftVM14-Nov-22 6:30
MVSoftVM14-Nov-22 6:30 
AnswerRe: JavaFX ScrollPane scroll child to bottom Pin
englebart19-Nov-22 15:53
professionalenglebart19-Nov-22 15:53 
QuestionError while fetching Path locally during unit testing but not at runtime Pin
saurabh jasmeen mehta12-Nov-22 19:44
saurabh jasmeen mehta12-Nov-22 19:44 
I am trying to find the path of resource using Paths like below and then copying some files at runtime. While at runtime it works perfectly fine. However while running locally for junit testing, it throws below error at the below first line while trying to get Path using URI. I am not using any zip/jar file so why I am getting the below stack trace. Am I missing something?


Java
Path path= Paths.get(ABCD.class.resource("/").toURI());
String mockFileName="cacerts";
File mockFile= new File(path+File.seperator+mockfileName);


Error

Java
java.nio.file.FileSystemNotFoundException
    at com.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:171)
    at com.sun.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:157)
    at java.nio.file.Paths.get(Unknown Source)

AnswerRe: Error while fetching Path locally during unit testing but not at runtime Pin
Richard MacCutchan12-Nov-22 21:15
mveRichard MacCutchan12-Nov-22 21:15 
AnswerRe: Error while fetching Path locally during unit testing but not at runtime Pin
jschell14-Nov-22 6:36
jschell14-Nov-22 6:36 
Questionradiusofcircle Pin
Halima Kidiwala9-Nov-22 17:03
Halima Kidiwala9-Nov-22 17:03 
AnswerRe: radiusofcircle Pin
Richard MacCutchan9-Nov-22 22:00
mveRichard MacCutchan9-Nov-22 22:00 
Questioncheck and correct the following code Pin
EngySamy23-Oct-22 14:40
EngySamy23-Oct-22 14:40 
GeneralRe: check and correct the following code Pin
Richard MacCutchan23-Oct-22 21:50
mveRichard MacCutchan23-Oct-22 21:50 
GeneralRe: check and correct the following code Pin
EngySamy23-Oct-22 22:55
EngySamy23-Oct-22 22:55 
GeneralRe: check and correct the following code Pin
Richard MacCutchan23-Oct-22 23:24
mveRichard MacCutchan23-Oct-22 23:24 
GeneralRe: check and correct the following code Pin
Dave Kreskowiak24-Oct-22 2:30
mveDave Kreskowiak24-Oct-22 2:30 
GeneralRe: check and correct the following code Pin
Richard MacCutchan24-Oct-22 3:26
mveRichard MacCutchan24-Oct-22 3:26 
AnswerRe: check and correct the following code Pin
jschell24-Oct-22 14:03
jschell24-Oct-22 14:03 
QuestionI have problem in Recursion code please help Pin
EngySamy22-Oct-22 16:19
EngySamy22-Oct-22 16:19 
AnswerRe: I have problem in Recursion code please help Pin
Gerry Schmitz23-Oct-22 5:49
mveGerry Schmitz23-Oct-22 5:49 
GeneralRe: I have problem in Recursion code please help Pin
EngySamy23-Oct-22 14:53
EngySamy23-Oct-22 14:53 
QuestionWhat are the details regarding project and/or make file in Java? Pin
Xarzu7-Oct-22 18:18
Xarzu7-Oct-22 18:18 
AnswerRe: What are the details regarding project and/or make file in Java? Pin
Richard MacCutchan12-Oct-22 21:18
mveRichard MacCutchan12-Oct-22 21:18 
QuestionProblem in java pattern program Pin
Shashank Singh Sep202228-Sep-22 5:53
Shashank Singh Sep202228-Sep-22 5:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.