This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

seeing classpath

 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to see what the classpath is set to while something is running? Is there a method to get it?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String classpath = System.getProperty("java.class.path");
 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Cindy is there any method to set the classpath at runtime using any method.Is there any way of running dos commands too,for Runtime.exec()will accept only exe files as parameters
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by netharam ram:
Hi,Cindy is there any method to set the classpath at runtime using any method.
No, except by instantiating new class loaders.
Is there any way of running dos commands too,for Runtime.exec()will accept only exe files as parameters
Runtime.exec() will run DOS commands as well, you just need to run the command interpreter. Your COMSPEC environment variable will give its name; on NT, it's cmd.exe. For example, Runtime.exec("cmd.exe /c dir > \\dir.txt"); will create a directory listing in the "\dir.txt" file.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic