R Nordstrom

Greenhorn
+ Follow
since Oct 08, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 R Nordstrom

Hi,   For some years now I have been using Java Simple Serial Connector (JSSC) to implement serial communications with various devices in my test systems.  I am now at a point where I could jump ship to a new product.  JSerialComm has popped up as a possible alternative. Does anyone have any experience with the quality of jSerialComm or perhaps there is something else to consider ?

Thank you for your help.
Roy
1 week ago
Hi,  I am very new to TCP/IP and sockets.  I have taught myself enough to get a client going on my linux machine and a server on my win7 machine.  This is all using SSL / JSSE.
Things are configured so that my server is at home connected to my DSL router.  Testing is performed by taking my client to the local library, and use their wifi to connect to my server at home.  

The connection works with IPv4 (using the public address of my router, obtained from test-ipv6.com).

However, when testing with the IPv6 ( obtained from the win7 command shell, ipconfig ), the connection attempt never works.  One confusing aspect to this is that ipconfig produces two IPv6 addresses:
one labeled as temporary IPv6, and another labeled as IPv6. Neither has worked for me.  

Some additional info:   test-ipv6.com has told me that my router is using a 6RD Tunnel.
                                 Port forwarding has been configured on my router
                                 A static IP address has been configured on my win7 machine

Shouldn't at least one of these IPv6 addresses work for me ?
Thank you for your help.
Roy
Hi Paul,  Here is the result from the command window.

C:\dist>java ClassFileServer 2001 C:\
Error: Could not find or load main class ClassFileServer
Caused by: java.lang.ClassNotFoundException: ClassFileServer

I appreciate your time and effort, however, I found another tutorial on JSSE that is going more smoothly.

So I would like to close this issue.

Best Regards

Roy  
4 months ago

here is the zip file for my netbeans project ( ClassFileServer.zip )

https://easyupload.io/gayd2w
4 months ago
I tried executing ClassFileServer.java exactly as the tutorial stated.  It still throws an error.  I think that instead of trying to troubleshoot Oracle's code, I should just find another tutorial on JSSE.  Could you make a recommendation on one that starts with only TCP/IP ( and does not use HTTP ) ?
Thanks   Roy
4 months ago
Hi,    I made the jar myself when I created a netbeans project with the 2 given files in the example code.  So I will go back to the tutorial and try executing it exactly as they stated.
4 months ago
Hi ,   I am working on a JSSE tutortial from Oracle.  See the link below.

https://docs.oracle.com/javase/10/security/sample-code-illustrating-secure-socket-connection-client-and-server.htm#JSSEC-GUID-3561ED02-174C-4E65-8BB1-5995E9B7282C

Using the sample code for ClassFileServer I have created a project in netbeans 11.  It cleans and builds OK.
Please see the attached files ClassFileserver.java, and ClassServer.java

When the jar file is executed from the command prompt I get this error:

C:\dist>java -jar ClassFileServer.jar 2001 C:\
Error: Could not find or load main class classfileserver.DateServer
Caused by: java.lang.ClassNotFoundException: classfileserver.DateServer

Note:  I also executed this with the optional arguments, TLS and TLS true.  Same result.

Not sure how to fix this, the text "DateServer" does not appear in either of the java files.

Any help would be appreciated.

Roy
4 months ago
Thank you very much.  This answers my question.
Roy
Hi,
I have been studying JSSE in an Oracle webpage listed below.  Under the topic "Configuration requirements for SSL socket samples" they direct me to use the samplecacerts file for the truststore.
Darned if I can find a correct place to download samplecacerts for this tutorial.

Can someone point me in the correct direction ?

Thank you
Roy


https://docs.oracle.com/javase/10/security/sample-code-illustrating-secure-socket-connection-client-and-server.htm#JSSEC-GUID-A4D59ABB-62AF-4FC0-900E-A795FDC84E41
Hi,    I have recently moved my development work from NetBeans8/JDK1.8 to NetBeans11/JDK11.

A significant number of errors are now present in the code generated by the GUI builder.

Here is the first:

C:\adata\java\NB11\J3-10\src\REN\My_Frame.java:736: warning: [rawtypes] found raw type: JList
 Output_Type = new javax.swing.JList();
 missing type arguments for generic class JList<E>
 where E is a type-variable:
 E extends Object declared in class JList

I have found that the error can be solved if the JList is deleted from the gui builder, and then manually rebuilt.  However, this is very tedious,
and there is always the possibility that I can introduce bugs into code that is already working.

Is there a simpler way to fix these gui builder issues ?

Thank you
Roy
       
7 months ago
Hi Every one,

I figured out the root problem.  Netbeans 9, 10 and early 11, have a bug.  When the clean/build is executed it does not add the appropriate Class-Path line to the manifest file.  Also it does not create the lib folder for your library jars.  This problem was solved in Netbeans 11.2.  By installing Netbeans 11.3 I now have a good command line launch in win7 and ubuntu 18.04.

Thank you
Roy
8 months ago
I found a Class-Path line in a project jar from my NetBeans-8 projects.


This is what my manifest file contained:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.4
Created-By: 1.8.0_40-b26 (Oracle Corporation)
Class-Path: lib/jssc.jar lib/jna-4.1.0.jar lib/commons-math3-3.6.1.jar
X-COMMENT: Main-Class will be added automatically by build
Main-Class: REN.My_Frame

So now I need to figure out why Netbeans-10 is not adding this line, or modify my current project jar/manifest file.  

I am not sure how to do either of these, but at least I know what is wrong.  

Roy
8 months ago
Hi,

I opened J3-09.jar with 7-zip.   This is the contents of MANIFEST.MF

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.10.4
Created-By: 11.0.2+9-LTS (Oracle Corporation)
X-COMMENT: Main-Class will be added automatically by build
Main-Class: REN.My_Frame


I do not see a Path-Class statement. Do I need one ?

Thank you
Roy
8 months ago
Hi,

This is where I am at:   My project (J3-09) runs great on netbeans10 (JDK11) and my windows7 machine.

However, This is what I see at the command line:

C:\dist2>java -jar J3-09.jar
Error: Unable to initialize main class REN.My_Frame
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/math3/
linear/RealVector

I have 2 jar library files in the dist2 folder:    commons-math3-3.6.1.jar, and jssc.jar

My research indicates that my main class is not able to find the jar libraries.    

What is the best way to solve this ?

Note that a solution also needs to be deployable to my Ubuntu 18.04 machine.

Thank you
Roy
8 months ago