As mobile agents reside on on-board units or mobile devices and act on behalf of drivers, it imposes a strong demand to devise mechanisms for protecting the algorithms that are exclusively coded in mobile agents for ditTerent drivers. Although contactless smart cards are widely used as a means to protecting personal information, it is still a challenge to protect the whole code of a mobile agent in a limited storage. In this paper, we propose a tool, called jExtractor, by which the private or sensitive data coded in a Java-based mobile agent can be extracted and moved to a contactless smart card, and can further be read from the card and merged to be the original mobile agent. Moreover, we use 30,000 Java classes as samples to validate jExtractor. In the experimental result, 79.4% of the sample classes can successfully be extracted and moved to Mifare Standard S50 (lK) smart card with our strictest configuration level.