Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

peter hammond

Ranch Hand
+ Follow
since Apr 20, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by peter hammond

that was hard work 3 hours of changing code today and still a few more classes left to do..

well at-least i learnt how to do it properly now...

6 years ago
wow thanks for the link John Damien Smith thats exactly what i need...

thanks guys will get on and redesign my project..

when i started out as a greenhorn when i started my project 2 years ago it has grown when i learnt more and more about how to structure projects, so its been a long term coming to recode a lot of it...

very grateful for the support..

many thanks..
6 years ago
have been having a play and reading up on the errors and after i remove all the static components on the initialize the GUI does display, so im guessing i need to remove all static components from the @FXML and use a getter to get the components from other classes when i want to use them..

seems a bit extreme as it works on everything up to java 8
6 years ago
i had a look but i can see anything obvious i was getting confused as not totally sure what i need to be looking at and what to compare..

output is

6 years ago
Hi Thanks for a prompt reply..

the resource still shows there but it works fine on 10 java 7 machines but fails on the Java 8 machines, if i set the JDK to test program back to 7.40 it works fine....

something has changed in the Java 8

the stack trace is this... if it was resourse issue it would say destication not known?
6 years ago
Hi Guys...

i had a program that has been working fine since finishing it but just upgraded to java 8 and now it wont run and errors with a null pointer...

the place that causes all the trouble is below..

that line returns a null exception in java 8 but fine in 7

any idea?

many thanks...
6 years ago
Hi Guys

I am now working on a JavaFX UI and it is starting to get bigger and bigger when the users want more items added and i am now struggling to keep on top of it...

the user will have 2 scene's to interact with they are fxml's with there individual controller and 1 of the controllers is the main controller that holds the massive thread method.....

each method goes off and does its own little task and returns so the next one can do its thing...

is this right?? or should i have a separate task for each method and in the succeeded point to the next task??

and pointers will be great many thanks...

6 years ago
ok sure thanks for the replys.....

basically i wanted to get the output of the system running the APP so i can pass a double check that i will be adding the mbr on the correct drive....

wanted the below output.... had to use a script that someone else made but its just the ticket as couldnit find a java only way...

6 years ago
no not a system admin, i just wrote a standalone FX program to resolve a issue where we have multiple users that need to be able to boot various images to access restricted desktops via a USB Key dongle....

the app i am talking about is standalone and runs on windows only and its a way to install grub and syslinux on the user keys automatically for them so they dont do it on the wrong drive...

that is the sole reason i have asked here how to get the physical name for the usb drive to be used...... as i have the below to give the user only access to removable media locally..

when i pass the string to Runtime,exec() i want to be sure i get the drive correct.. the end user will never be able to select the wrong drive....


counter is my temp solution to get the HD number it will never be harddisk 0 as thats the primary HDD that would be bad....

but i have been researching VBS script on google as i mentioned earlier and think i found a solution but just working on making it into a nicer list for me to work on, posted below incase someone else finds the same issue when matching the logical with physical..

not sure if if follow correctly with your references to system admin?? should i be doing it incorrectly im happy to change it to to be safe or better practices as everyday is a learning day,,,
6 years ago
thanks guys

sorry for the late reply i got called a way to work overseas last minute...


thanks i have added that in to get the names but i also needed to tie it in with a physical location also, while i was away i mentioned it to a guy who said it can also be done with a script im still yet to research it but he mentioned to search for

not sure what it will come back with i have never used a script before to do stuff..


i have a javaFX for loading up multiple bootable images for work on USB drives and i use grub with syslinux to install the MBR and PBR on the USB via nice FX app...

instead of running the grubinist through windows as a Runtime should it be run via a script? as isnt it still doing the same thing? (NOTE i only run that once as only want to install a new MBR on USB drive)

And yes i have JNA to elevate the command to sys admin rights...
6 years ago
Hi Ranchers

Is it possible to get the PhysicalDrive name of a disk from the windows drive naming convention? i.e i want to find what PhysicalDriveX that d:volume is on??

i want to pass a command to grubInst.exe from my java app but grubinist only works with physical disks..... and i really don't want to add a bootloader to the wrong disk...

any pointers?

many thanks

6 years ago
thanks for the reply...

i wasn't sure how best to access these members i will leave them as they are then good idea on the listener i will add one of them in....
7 years ago
hi guys

i have a GUI that has the usual suspects in it a ComboBox and Treeview and Listview.. (javaFX)

my question is should these members be public or should i keep them private and use a public method to return and add values to these members?? from other classes and Threads and methods....

hope that makes sense

many thanks for your advice...

arrh wrong section sorry bout that....
7 years ago

e.printStackTrace() worked a treat printed out the full error so i can fix it and have thanks for your great help..

this what i put in the end....

8 years ago
ok will give it a try...

i have to wait for the other person to get back to me as its not my system that has this problem..


thanks for your help..
8 years ago