/*
* IBS send encripted XML
*/
// import needed packets
import java.text.*;
import java.awt.*;
import java.applet.*;
import bsc.security.*; // <---- external .JAR
public class XMLDataWithSignature
{
public static String xmlToSign = "zzzzzzzz";
public static String XML64;
public static void main(String args[])
{
XML64 = bsc.security.Secto.BASE64Encode(xmlToSign);
System.out.println("hahahha");
}
}
-----------------------
C:\Program Files\JDK\bin>"C:\Program Files\jdk\bin\javac.exe" -verbose -d C:\MY_DOCS\CODiNG\JAVA\IBS_BASE64 -classpath "C:\Program Files\JDK\jre\lib\i18n.jar;C:\Program Files\JDK\jre\lib\jaws.jar;C:\Program Files\JDK\jre\lib\rt.jar;C:\Program Files\jdk\lib\dt.jar;C:\Program Files\jdk\lib\tools.jar;C:\Program Files\jdk\lib;C:\Program Files\JDK\jre\lib;C:\MY_DOCS\CODiNG\JAVA\IBS_BASE64\security.jar;" -g -deprecation XMLDataWithSignature.java
[parsing started XMLDataWithSignature.java]
[parsing completed 180ms]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/lang/Object.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/lang/String.class)]
[checking XMLDataWithSignature]
[loading C:\MY_DOCS\CODiNG\JAVA\IBS_BASE64\security.jar(bsc/security/Secto.class)]
XMLDataWithSignature.java:18: non-static method BASE64Encode(java.lang.String) cannot be referenced from a static context
XML64 = bsc.security.Secto.BASE64Encode(xmlToSign);
^
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/lang/System.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/io/PrintStream.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/io/FilterOutputStream.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/io/OutputStream.class)]
[total 6028ms]
1 error
-----------------
how execute the non-static method from static class ???
* IBS send encripted XML
*/
// import needed packets
import java.text.*;
import java.awt.*;
import java.applet.*;
import bsc.security.*; // <---- external .JAR
public class XMLDataWithSignature
{
public static String xmlToSign = "zzzzzzzz";
public static String XML64;
public static void main(String args[])
{
XML64 = bsc.security.Secto.BASE64Encode(xmlToSign);
System.out.println("hahahha");
}
}
-----------------------
C:\Program Files\JDK\bin>"C:\Program Files\jdk\bin\javac.exe" -verbose -d C:\MY_DOCS\CODiNG\JAVA\IBS_BASE64 -classpath "C:\Program Files\JDK\jre\lib\i18n.jar;C:\Program Files\JDK\jre\lib\jaws.jar;C:\Program Files\JDK\jre\lib\rt.jar;C:\Program Files\jdk\lib\dt.jar;C:\Program Files\jdk\lib\tools.jar;C:\Program Files\jdk\lib;C:\Program Files\JDK\jre\lib;C:\MY_DOCS\CODiNG\JAVA\IBS_BASE64\security.jar;" -g -deprecation XMLDataWithSignature.java
[parsing started XMLDataWithSignature.java]
[parsing completed 180ms]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/lang/Object.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/lang/String.class)]
[checking XMLDataWithSignature]
[loading C:\MY_DOCS\CODiNG\JAVA\IBS_BASE64\security.jar(bsc/security/Secto.class)]
XMLDataWithSignature.java:18: non-static method BASE64Encode(java.lang.String) cannot be referenced from a static context
XML64 = bsc.security.Secto.BASE64Encode(xmlToSign);
^
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/lang/System.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/io/PrintStream.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/io/FilterOutputStream.class)]
[loading C:\Program Files\jdk\jre\lib\rt.jar(java/io/OutputStream.class)]
[total 6028ms]
1 error
-----------------
how execute the non-static method from static class ???