Samuel Marchant

Ranch Hand
+ Follow
since Sep 06, 2020
Sydney NSW Australia
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Samuel Marchant

Update 25th - should all work after compile now

Don't forget to bind the output libs to your editor so it knows you are compiling a web app with those binaries when writing jsp or servlet

New docs
And concatenated repaired
String literal conc. - I was right it works, it was syntax input, those commas are tiny
2 months ago
Update 23rd Sept
Reasonably complete with a few minor hiccups sorted

https://www.scribd.com/document/477020061/Modifying-Tomcat

2 months ago
Sept 21 2020
Just found a major bug in the code ! ! !
In fileloader() method in both classes it is incrementing or resetting the array index before the variable is set on the array ! ! !

Other class is B64 for data:image and MIME attachments in mail.
2 months ago

Campbell Ritchie wrote:But System.in always implicitly might have a next line; as soon as you push any key that next line will exist and hasNextLine() will return true. So...is going to behave as an infinite loop.



What interests me is the scanners are on seperate instances , are new and not static.
The STDIN and STDOUD are in effect static as there is only  one OS and computer so in effect the two scanner references are of something that never closes anyhow.
2 months ago
hasNextLine() returns boolean if you do not use a loop at least use an "if" test to determine whether to call nextLine()
2 months ago
Why not remove the synchronised block and place synchronised on the method,
private synchronised void LockAccount(String AccountNumber)

? Why is the set hash "static" that looks bad, also appears bad to have it outside the method ...
If your jar has a main class you need to set the jar file permission to executable.
To start it from the runtime .exec() method in a String is exactly the same as as the command line version for starting a jar.
However, if another program starts it as a jar , use some form of "class loader linker" from either
java.net.URLClassLoader
Or
https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html
https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html
Class.forName( class.  ,  Clasloader )
To start an app would be obtain the bootstrap loader not the system loader.
2 months ago
When you say new File with a path in it it's a file object "theoretically" so asking if it is a folder when there is no existence of it is in fact a deceptive return on
isFolder because a file does not need to have an extension but you have not created it.

Second I don't know why you would put the mkdir command method in a println statement, that certainly would not help, the best. I can gather it's used the Object toString output but best remove it to its own line.
2 months ago
...damn phone auto correct...
That last post part should read...
Need to use "chown" command if your in Linux or Unix.
2 months ago

Yusof Khan wrote:The problem that I'm facing is expounded to java I produce a full java program (Car rental System) with guis my I used Files to store data and it absolutely was operating fine and with no bugs additionally, I created a jar and exe file all of them were working simply fine however once formatting my computer I'm facing issues in adding a user to my program or something involving the files will anyone help, please.



It sounds like you have a problem of file permissions such as "set executable" and add the local user account to read write execute on the jar "file properties" popup tab.
You may have compiled it as administrator or Super user of your in Unix Linux and need to use chosen command on the jar to hand ownership to the local user account.
2 months ago
Another point, by protocol the request may be required to be urlencoded first.
setSize is inherited from java.awt the other three are part of swing. To use setSize requires the layout manager not committing any sizing on the component you want to size, but since that can be a contradiction in a flowlayout inside it's panel if the programmer sets sizes that do not fit for the internal component it needs to know what it may be doing or what it can rationally show or have used.
One of the most real aspects is jframe resizing is not the final problem to fit internal components, it's if the same binaries are used in the user computer at a different resolution. Accounting size generally also requires adding some space on borders of the layout between components.
2 months ago

Paul Clapham wrote:

Well, exactly. So suggesting to people in CAPITAL LETTERS that they must set the size of Swing components is less than helpful.



Trying to setSize by continually reapplying the same old cracked record setSize won't cause it to operate either.
setPreferredSize has to be set on
swing components if they are in the direct layout of  a component that is not a layout that controls the size of the next direct component e.g. borderlayout boxlayout and gridbaglayout.
setSize may work temporarily with flowlayout because it only controls position in it but setSize is only an action like repaint() after it occurs anything changing it by effect in the VM operations can and that can occur immediately or before it is rendered to the screen, it's an action on it not a setting setPreferredSize is closer to a setting .
It's not that setSize does not do that, it happens in a moment just like repaint does it comitted like repaint does but the effect of the action has no guarantee it will be there after the method is finished with it in nonoseconds.

I think you will find (and in my 20 000 lines of code in 2 swing programs) you want to do what I said and use at least the three method and setSize is is just an il perfecto contentness if the containing layout allows sizing calls.

2 months ago