bobt Thompson

Greenhorn
+ Follow
since Oct 27, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 bobt Thompson

I use the WindowBuilder form designer a lot, and it's a real pain to have to click on the property window every time I want to set the value for a property (like a control's width or height).  In Delphi you can press F11 to go immediately to its property window (called the Object Inspector).  Is there a similar shortcut in Eclipse?  My arm is getting tired from reaching for the mouse all the time.
2 weeks ago
Is there a way to initialize Java class arrays, like below?  I searched and searched and can't find anything similar to what I'm looking for.



 
I know in Delphi it's possible to do something like that.




}
3 weeks ago
Ok, I'm getting really frustrated.

I tried creating a .vbs file to invoke the link file and running that from within the jar file.  Again it worked in Eclipse.  From the runnable .jar file I got this message.

Best I can tell, it's not possible to run a Windows shortcut from a runnable Java jar file!

---------------------------
Windows Script Host
---------------------------
Script: C:\Users\bthompson\temp.vbs
Line: 10
Char: 1
Error: No application is associated with the specified file for this operation.
Code: 80070483
Source: (null)

---------------------------
OK  
---------------------------
1 month ago
I have a strange problem.  I'm trying to run a Windows program from a shortcut (.lnk file), using the command below.  It works just fine when I run it from within Eclipse, but as soon as I generate a runable .jar file and execute it from there, I get the error message shown below.  A dir command of the file C:\Shorts\npn.lnk proves that it DOES exist.  Is there some reason I can't run link files from within a runnable .jar file (but it works in Eclipse)?



ERROR MESSAGE:
[Content]
C:\Shorts\npn.lnk
The specified path does not exist.

Check the path, and then try again.

[OK]
1 month ago
I have a program that loads images into button glyphs using the code below.  It works when I run it interactively in Eclipse, but when I generate a JAR file using "ant jar", I get the exception below:

Code:


$java -jar DasEdit.jar
java.lang.NullPointerException
       at javax.swing.ImageIcon.<init>(Unknown Source)
       at pkgMain.Mainfrm.initScreen(Mainfrm.java:286)
       at pkgMain.Mainfrm.initialize(Mainfrm.java:467)
       at pkgMain.Mainfrm.<init>(Mainfrm.java:277)
       at pkgMain.Mainfrm$1.run(Mainfrm.java:189)
       at java.awt.event.InvocationEvent.dispatch(Unknown Source)
       at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
       at java.awt.EventQueue.access$500(Unknown Source)
       at java.awt.EventQueue$3.run(Unknown Source)
       at java.awt.EventQueue$3.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
       at java.awt.EventQueue.dispatchEvent(Unknown Source)
       at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
       at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
       at java.awt.EventDispatchThread.run(Unknown Source)



Here is the portion of my build.xml file that generates the .Jar file.



I have tried putting the .png files in both the "/src" directory and "/src/pkgMain", but to no avail.  I cannot get the image loading to work in the ant generated .Jar file.  Any idea what I'm doing wrong?  Thanks in advance!
2 months ago
I have a Tomcat installation on a Centos 7 Linux server, and when I deploy a war file to the "./webapps" folder, it explodes the folders and files with "root" as the owner and group.  How do I prevent this from happening?  I want them to deploy with "tomcat" as the owner and group.
2 months ago
Can someone give me a clue how to obtain the necessary libraries to builg a Selenium project using Java Eclipse?  I Googled it, went to the page where you supposedly download the files needed to create such a project, but ever page I go to gives me an "Error 404 - page not found".  Is Selenium dead?  Where can I get the files I need?

Is there some other library I can use to automate a web page.  I'm trying to open Chrome and automatically log into a web page by supplying the username and password, so I don't have to type it in every time.

Thanks.
3 months ago
I'm working on a graphics program that displays a plot and, when the user moves the cursor over the plot, moves to the (x,y) location of the data point.  To do this, I'm using a Robot.  However, when I implement this code in a mouse move event, the mouse jumps around to random locations on the screen.

So, I simplified the code so it only moves to the current mouse location.  You should see no effect, but the mouse still jumps around the screen.

1 year ago