473,654 Members | 3,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# classpath equivalent?

Okay this is going to sound really dumb. Skeet, you can poke fun of me
in your own special way if you see fit.

Is there a way to reproduce the CLASSPATH functionality of Java within
C#? Would there ever be a reason to do this? Is there a reason *not*
to do this? There must be, I think, or there would probably be a
CLASSPATH environment variable.

I'm tired of typing /r:... at the command line. I have an IDE, and I
use it, but on some systems there is no IDE and when I want to make a
quick code change and recompile, there's no CLASSPATH to help me.

Why no CLASSPATH environment variable equivalent?
Apr 3 '06 #1
3 11546
jeremiah johnson <na*******@gmai l.com> wrote:
Is there a way to reproduce the CLASSPATH functionality of Java within
C#? Would there ever be a reason to do this? Is there a reason *not*
to do this? There must be, I think, or there would probably be a
CLASSPATH environment variable.

I'm tired of typing /r:... at the command line. I have an IDE, and I
use it, but on some systems there is no IDE and when I want to make a
quick code change and recompile, there's no CLASSPATH to help me.

Why no CLASSPATH environment variable equivalent?


One thing you can do is to use a custom response file if you find
yourself using the same references frequently. An example (and the one
used by default) is in the .NET framework directory - csc.rsp. You can
specify one on the command line by doing

csc @foo.rsp X.cs Y.cs etc

I don't know of any environment variables which do the same, but they
may be there.

Interestingly, these days I think Java developers tend to try to avoid
using the CLASSPATH environment variable, preferring to explicitly
specify the jars/paths on the command line. There are advantages and
disadvantages of both ways, however.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 3 '06 #2
Jon Skeet [C# MVP] wrote:
jeremiah johnson <na*******@gmai l.com> wrote:
Is there a way to reproduce the CLASSPATH functionality of Java within
C#? Would there ever be a reason to do this? Is there a reason *not*
to do this? There must be, I think, or there would probably be a
CLASSPATH environment variable.

I'm tired of typing /r:... at the command line. I have an IDE, and I
use it, but on some systems there is no IDE and when I want to make a
quick code change and recompile, there's no CLASSPATH to help me.

Why no CLASSPATH environment variable equivalent?


One thing you can do is to use a custom response file if you find
yourself using the same references frequently. An example (and the one
used by default) is in the .NET framework directory - csc.rsp. You can
specify one on the command line by doing

csc @foo.rsp X.cs Y.cs etc

I don't know of any environment variables which do the same, but they
may be there.

Interestingly, these days I think Java developers tend to try to avoid
using the CLASSPATH environment variable, preferring to explicitly
specify the jars/paths on the command line. There are advantages and
disadvantages of both ways, however.


I didn't know about response files. Thanks a ton, Jon. This will save
me a lot of typing. :)
Apr 3 '06 #3
I have never done at command line... but just a thought, can't you keep a
batch file and just run it when you have no IDE?? I maybe way of line
here...

VJ

"jeremiah johnson" <na*******@gmai l.com> wrote in message
news:e3******** ******@TK2MSFTN GP15.phx.gbl...
Okay this is going to sound really dumb. Skeet, you can poke fun of me in
your own special way if you see fit.

Is there a way to reproduce the CLASSPATH functionality of Java within C#?
Would there ever be a reason to do this? Is there a reason *not* to do
this? There must be, I think, or there would probably be a CLASSPATH
environment variable.

I'm tired of typing /r:... at the command line. I have an IDE, and I use
it, but on some systems there is no IDE and when I want to make a quick
code change and recompile, there's no CLASSPATH to help me.

Why no CLASSPATH environment variable equivalent?

Apr 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4170
by: Herman | last post by:
Hi everyone, I recently installed the Sun J2SE SDK on my machine, and I am having trouble running the java.exe interpreter for my Java compiled code. I remember that I had to set my environment CLASSPATH variable to whatever the current directory is, but I forgot the exact characters to denote this. Or that there was an extra call to the java interpreter (like -cp or -classpath) to indicate the current directory, but that escapes me as...
1
3343
by: Christopher V. Kimball | last post by:
How do I put many jar files into the classpath without having to name each one? This is in Windows 200, in which setting any environmental variable is tedious. Chris Kimball
2
4125
by: David Cook | last post by:
Windows (XP and NT) allows one to specify environmental variable (such as PATH and CLASSPATH) at both the SYSTEM-wide level as well as at the per-USER level. And the behavior has always been that the value of one's PATH list is the concatenation of those two ENV specifications. So, the $64 question is: Is there some way to coerce the resulting CLASSPATH list to also be a concatenation of both the SYSTEM and the USER's lists?
4
6555
by: Abdelhalim MIMOUNI | last post by:
hi, i'm new to java, and using sun last JDK, and i'm trying to understand how work this feature when we want to compile at command line ? i'm trying to set the classpath to the directory of the package but still always not working! thank's. -- AbdelHalim MIMOUNI
1
10242
by: Dave Keays | last post by:
I am setting-up an experimental web service using Apache Axis but I'm having problems. AXIS can't find a library that I've verified exists on my computer and that CLASSPATH points to it. I'm using a simple service for testing purposes (1 string IN, 1 string OUT) and I've found where the exception occures but not why. But I've exhausted my own attempts. I've researched the web for Axis issues and here is a brief description of the...
4
3633
by: Kunle Odutola | last post by:
I'm trying to understand where the information in the META.INF directory including MANIFEST.MF etc is to be found for .NET assemblies. Also some projects such as Eclipse's OSGi kernel stores additional info in the MANIFEST.MF file. What would be the .NET equivalent where such info can be stored? Kunle --
7
17881
by: dlarsson | last post by:
Okay folks, I thought I was doing something very, very simple, but I cannot seem to get this to work at all. Can anyone identify what I am doing wrong here-? _________________________________ 1. I have a class called "Car" that defines a package with the statement: package com.example.rentalcar;
9
25866
by: KevinRobinson | last post by:
Hi, Can anyone please tell me how to add or change a Java classpath in SUSE Linux 9.3. I have set up a Tomcat server but my Java Classes will not run although they do on a windows box. Kevin
1
3297
Ganon11
by: Ganon11 | last post by:
Hey all, I'm setting up my computer to run Java for a class I'm taking, and I've gotten into a bit of a snag. I've set the CLASSPATH system variable to include the base folder of my homeworks etc: "CLASSPATH=C:\Users\Ganon11\Documents\Programming in Java;..." I can now use the java and javac commands when my files are located in this folder. However, for organization, I wanted to put my files in separate folders based on the...
0
8814
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8706
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2709
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.