• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Executing Java class inside folder structure jar files

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have below files in my local system in one of the folder name "C:\Jay Shukla\BAU Releated\GPS SWAT\encryption"


juice_1.jar
jconfig_1.jar
jconfigkey.jar
cryptix32.jar
jaxb-api.jar
jaxb-xjc.jar
jaxb-impl.jar
jaxb-libs.jar
jaxb-ri.jar
streamJConfigCrypter.jar
GPSConfiguration.xml
GPSConfigurationEnc

I want to somewhat like below command.

java com.americanexpress.util.jconfig.tools.FileEncryptionUtility GPSConfiguration.xml GPSConfigurationEnc com.americanexpress.util.jconfig.security.StreamJConfigCrypter

but i am not able to run it. It gives me could not load or find class.

I have already set below classpath using below commnd from location "C:\Jay Shukla\BAU Releated\GPS SWAT\encryption" on command prompt:

set CLASSPATH=juice_1.jar;jconfig_1.jar;jconfigkey.jar;cryptix32.jar;jaxb-api.jar;jaxb-xjc.jar;jaxb-impl.jar;jaxb-libs.jar;jaxb-ri.jar;streamJConfigCrypter.jar;.

Location of FileEncryptionUtility (part of jconfig_1.jar): com.americanexpress.util.jconfig.tools.FileEncryptionUtility
Location of StreamJConfigCrypter (part of jconfig_1.jar): com.americanexpress.util.jconfig.security.StreamJConfigCrypter


Could someone help me encrypting file GPSConfiguration.xml using above utility.
This is really urgent for the business needs.

I have tried different options but did not work

Thanks
 
Jay Shukla
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting below Error message when i run below command.

Command: java com.americanexpress.util.jconfig.tools.FileEncryptionUtility GPSConfiguration.xml GPSConfigurationEnc com.americanexpress.util.jconfig.security.StreamJConfigCrypter


C:\Jay Shukla\BAU Releated\GPS SWAT\encryption>java com.americanexpress.util.jco
nfig.tools.FileEncryptionUtility GPSConfiguration.xml GPSConfigurationEnc com.am
ericanexpress.util.jconfig.security.StreamJConfigCrypter

JConfig : DefaultJConfigCrypter : getEncKey : Exception while loading the encryp
tion key : Verify if file 'jconfigkey' for the correct environment is available
in the classpath : Non-encrypted configuration files can still be used without i
ssues : Details java.security.NoSuchAlgorithmException: JuicePK class not loaded
: readProperties(\amex\util\lib\juice.properties) failed - \amex\util\lib\juice.
properties (The system cannot find the path specified)
JConfig : FileEncryptionUtility : main : Exception in encrypting the supplied fi
le : GPSConfiguration.xml : Details : com.americanexpress.util.jconfig.exception
.EncryptionfailureException: JConfig : DefaultJConfigCrypter : encrypt : Generic
Exception in encryption : Details com.americanexpress.util.jconfig.exception.C
rypterInitFailureException: JConfig : DefaultJConfigCrypter : getCrypter : Could
not create a Crypter : Details : java.lang.IllegalArgumentException: JConfig :
JConfigUtility : validateObject : The supplied Object is null

C:\Jay Shukla\BAU Releated\GPS SWAT\encryption>


Can someone please guide.

Thanks.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jay Shukla wrote:set CLASSPATH=juice_1.jar;jconfig_1.jar;jconfigkey.jar;cryptix32.jar;jaxb-api.jar;jaxb-xjc.jar;jaxb-impl.jar;jaxb-libs.jar;jaxb-ri.jar;streamJConfigCrypter.jar;.



I would strongly suggest you provide absolute paths for those jars in that environment variable. Otherwise you are relying on the correct current working directory being set (which probably isn't happening in your case).
 
Jay Shukla
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

Thanks for reply.
I tried doing that as well and confirmed with echo %CLASSPATH% as well but still getting the same error message.

set CLASSPATH=C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/juice_1.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/jconfig_1.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/jconfigkey.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/cryptix32.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/jaxb-api.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/jaxb-xjc.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/jaxb-impl.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/jaxb-libs.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/jaxb-ri.jar;C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/streamJConfigCrypter.jar;.

Thanks.
 
Jay Shukla
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got error while loading XML file when i tried below command.


C:\Jay Shukla\BAU Releated\GPS SWAT\encryption>java -cp juice_1.jar;jconfig_1.ja
r;jconfigkey.jar;cryptix32.jar;jaxb-api.jar;jaxb-xjc.jar;jaxb-impl.jar;jaxb-libs
.jar;jaxb-ri.jar;streamJConfigCrypter.jar;. com.americanexpress.util.jconfig.too
ls.FileEncryptionUtility "C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/GPSConf
iguration.xml" GPSConfigurationEnc com.americanexpress.util.jconfig.security.Str
eamJConfigCrypter

JConfig : FileEncryptionUtility : main : Exception in encrypting the supplied fi
le : C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/GPSConfiguration.xml : Detai
ls : com.americanexpress.util.jconfig.exception.ConfigLoadingException: JConfig
: FileLoader : loadIndividualConfiguration : Failed to load the configuration fi
le C:/Jay Shukla/BAU Releated/GPS SWAT/encryption/GPSConfiguration.xml

C:\Jay Shukla\BAU Releated\GPS SWAT\encryption>



Thanks
 
Jay Shukla
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Could anyone please know is there any solution for this?

Thanks
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a solution to it? I'm sure there must be. You should start by looking at the error message and the stack trace associated with it, and go from there.

Or if you intended for your last post to be a question, I'd suggest reading TellTheDetails (<-- follow that link to our FAQ) to help you with posting good questions.
 
reply
    Bookmark Topic Watch Topic
  • New Topic