Menu

-Dconfig.location=".." - problem with jfig!

Help
whitehat
2005-01-31
2013-01-06
  • whitehat

    whitehat - 2005-01-31

    Hi, im having a problem with running jfig from the command line. Its installed and running fine in my java environment, but when i go to set the variables from the command line it always dies!

    this is what im doing:
    Dconfig.filename="C:\my1.config.xml" -Dconfig.location=%file%

    and it just doesnt work.. any ideas??

     
    • whitehat

      whitehat - 2005-01-31

      forget the '%' where file is... i have tried "file" and just file, and still it dies and says:

      Exception in thread "main" java.lang.NoClassDefFoundError: Dconfig/filename=C:\ msldev1/config/xml

      it seems to change '.' to '/', can i use an escape sequence or something?

       
    • Bruce Conrad

      Bruce Conrad - 2005-01-31

      It looks like it thinks the class that you're trying to run is
      Dconfig/filename=C:\msldev1/config/xml . It is not recognizing that you are passing a property.

      Is it possible that you left the "-" out of your command. Double check that you have -D and not D.

      Another thing to try is download the zip and run jfig.bat. You can start with that as a base and then change it to your config file and class.

      I have a new version that I need to package up that will ensure that config.location is either "classpath" or "file".

      Also, I would be interested to know how and where you are intending to use JFig. Thanks.

       
    • Bruce Conrad

      Bruce Conrad - 2005-01-31

      As I look at the message you sent to me directly, that is almost certainly the problem. In your following example you've left out the - before Dconfig.filename

      ===============.
      this is what im doing:
      –Dconfig.filename="C:\my1.config.xml" -Dconfig.location=%file%
      ============

       
    • whitehat

      whitehat - 2005-01-31

      Hi Bruce,
      I do have the '-' in my command, i just didnt copy and paste it over then. This is what command im running in catalina.bat

      %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% Dconfig.filename=c:/my.config.xml Dconfig.location=file -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

      the only part of that command that has changed is -Dconfig.location and -Dconfig.filename you can see that the '-' are there and its still bombing out with: 
      Exception in thread "main" java.lang.NoClassDefFoundError: Dconfig/filename=c:/
      msldev1/config/xml

      I will have a look into jfig.bat that you mentioned.

      Any further ideas? thanks.

      Nick.

       
    • whitehat

      whitehat - 2005-02-01

      Bruce,
      I finally got it working. Thanks. I pretty much copied the jfig.bat command and used the classpath

      -classpath "%CATALINA_HOME%/conf;%CLASSPATH%" -Dconfig.filename=mydev.config.xml -Dconfig.location=classpath

      Im using jfig b/c im working on a little project in 2 diff environments. dev and test... its v handy..

      cheers,
      nick

      Im thinking that config.filename is not an ablosulte location? but just the actual name of the file...
      ??

       
    • Bruce Conrad

      Bruce Conrad - 2005-02-01

      Glad you got it straightened out. Looks like you might be using it with Tomcat which is interesting. I've not done that. It would be nice to know if you get it working with different configs for different apps. Not sure if the different apps would be in separate jvm's. It's been a while since I used tomcat. Keep me posted on how you set it up.

      The config.filename is just the filename if you are using config.location=classpath. If config.location=file it is the absolute location.

      I hope you are using the latest version that has the smaller classpath...using jdk xml and regexp packages.

       
    • Natalia

      Natalia - 2005-03-04

      Hello:
      I try to run a program using JFig from Eclipse 3.0.1.
      If I use a default config file name, and put it in a directory included into the classpath, JFig can see an xml file just fine.
      If I rename the same file from default naming to "base_config.xml", keeping it in the same directory included into the classpath, and use -D JVM param to define the filename:
      Dconfig.filename=base_config.xml
      it gives me an exception
      java.lang.NoClassDefFoundError: Dconfig/filename=base_config/xml
      If I try it in debug, it gives errors:
      Cannot connect to JVM.
      Could not find the main class
      besides that
      NoClassDefFoundError printed.

      I tried to use config.location=file, and the fully qualified file name, and it does not work either.

      Any thoughts? Thank you!

       
    • Natalia

      Natalia - 2005-03-04

      Hello:
      We found a problem with that JFig usage from Eclipse.
      It was silly, and a result of copy/paste. The JVM parameter name
      Dconfig.filename
      was copied from the html JFig document examples, and the minus we see in front of "D" is not a minus, but a special character. It works after the correction.
      Cheers!

       

Log in to post a comment.