Mac, jcsp and classpath

Hi!
I have a Mac and I have to make a project for the college about concurrent programming in java,
for the project I have to use the jcsp package but I have a problem to set
the CLASSPATH.
I do what the Readme says, I put the jcsp.jar in my folder,
then add the path in the classpath editing the file .profile
in this way
CLASSPATH=$CLASSPATH:/System/Library/Java/Extensions/jcsp.jar
export CLASSPATH
I do
echo $CLASSPATHand really says
:/System/Library/Java/Extensions/jcsp.jar
but when I try to compile my code :
package jcsp.lang does not exist
import jcsp.lang.*;
^
MyProcess.java:3: cannot find symbol
symbol: class CSProcess
public class MyProcess implements CSProcess {
^
I tried to launch javac with argument
javac -classpath /System/Library/Java/Extensions/jcsp.jar MyProcess.java
but nothing, same error..
what's wrong?
Thank you so much for your help.

First, don't put third party jar files into the extensions folder of the java directory. It's a bad idea.
Second, the compiler will disregard any environment variables you have set up in .bash_profile. So if you are attempting to use:
javac -cp $CLASSPATH/jcsp.jar MyProcess.java
It won't work. You need to include the path to the jar file in the option like this hypothetical example...
javac -cp ~/Documents/myjavawork/myproject/jcsp.jar -d . MyProcess.java

Similar Messages

  • Manifest and classpath frustration

    I have a very simple standalone application. It is not an applet - it's a simple command line program that parses an XML stream and stores the results in a database. This app depends on a ton of external jar files. I would like to be able to build and run this thing - on different platforms - without having to mess with a bat or sh script. From perusing the web, it seems like I should be able to do this with a custom manifest file ... but I can't seem to get it to work. I keep getting a class not found error. In a nutshell, my jar looks like this
    lib
    com
    META-INF
    Insid the lib directory are around a dozen jar files
    Inside the com directory are all my class files
    Inside META-INF is the manifest file.
    My manifest file looks like this:
    Main-Class: com.mainClass.RunMe
    Class-Path: lib/jarOne.jar
    **lib/jarTwo.jar
    **lib/jarThree.jar
    Note that the *'s indicate spaces and I do have a blank line at the end of file.
    When I try to execute using:
    java -jar myJar.jar
    I continually get class not found errors. If I run in verbose mode, I can see that my classes aren't getting loaded.
    Can I do what I'm trying to do? Any pointers would be greatly appreciated as I'm running out of ideas and patience.
    THanks

    This isn't always legal. You can't "legally" assume you can extract any commercial jar file and bundle it with your app. If everything is open-source then there should be no problem. But for commercial apps, this wont work, at least legally.
    There are two solutions that work best. One is to use an installer that provides an executable launcher (.exe on windows, .sit on mac, etc). This will provide a setup.exe (or setup.sit or setup.sh or something for each platform), that will then install your app like a commercial application. This will take care of unzipping everything you want in the right directories. There are a couple of free/open-source installers, VAInstall is one that I can think of that aren't too shabby. At work we use Install4J which is pretty good.
    The other way is to use a custom classloader. First, your initial "main" class is nothing but a stub loader. It simply creates an instance of this URLClassloader subclass. You use it to find and run your "real" main() method within the classpath. URLClassLoader has a protected addURL(), but the constructor allows you to pass an array of URL objects, each that can be a directory of .class files or specific .jar/.zip files that become the classpath for the classloader instance. With this info, you can use a custom loader to add each of your .jar files located on disk as part of the classpath. The problem is, if they are on-disk, this isn't helping. What your custom loader needs to do is override loadClass(), getResource() and so forth, and provide a way to find classes from embeded jar/zip libraries inside the main jar file. This way, each time any class uses a class in an embeded jar/zip, your custom classloader looks inside the embeded jar/zip files for it as well. It's not prettty, but it works well.
    One final thought, a plugin engine based application framework is a way to go. My own project, www.platonos.org (sorry, as of this posting the site is not up yet, but the project at sourceforge is available and CVS contains the code) can solve these issues. In our plugin engine, which is about 70K, each plugin has it's own classloader and classpath, and our PluginClassLoader not only handles embeded jar/zip files, but resources as well within them. Also, a plugin first searches its classpath before going to the parent to find classes, with the exception of java classes which are delegated to the bootstrap loader which is what loads rt.jar.

  • I am using the mac QQ and when I login it said login timeout.

    I am using the mac QQ and when I login it said login timeout.

    If you are missing using google maps - try the Nokia map app called "here"

  • I have a MBPro mid 2013 with 1 Thunderbolt port. Just bought a Mac monitor and want to daisy chain a PC monitor to it. Use a Mini DVI to VGA adapter from MBP to PC monitor. How do I daisy chain the 2 monitors?

    I have a MBPro mid 2013 with 1 Thunderbolt port. Just bought a Mac monitor and want to daisy chain a PC monitor to it. Use a Mini DVI to VGA adapter from MBP to PC monitor. How do I daisy chain the 2 monitors?

    Hall Palm Desert,
    if your Mac monitor has Thunderbolt ports, and the PC monitor is on the end of the daisy chain, then you might be able to do it by connecting your PC monitor’s VGA cable to a Mini DisplayPort-to-VGA adapter (e.g. Apple, NewerTech), connecting that cable’s Mini DisplayPort end to one of the Mac monitor’s Thunderbolt ports, and then connecting a Thunderbolt cable between the other port on the Mac monitor and your MacBook Pro.

  • HT2623 I forgot the password for my .mac account and cannot log into it from Apple Mail.  I have an iCloud mail account but did not convert my .mac account to iCloud.  How can I log into my .mac or .me email?

    I set up .mac, including email, around 2006.  I believe my .mac account became a .me account, but I continued to receive email sent to .mac until about March 2013. 
    I accessed my .mac account using Apple Mail on an iMac running OS X 4.11.  I'm still using that machine.
    In July 2013, I upgraded my MacBook Pro to OS X 8.5, bought an iPod Touch and set up an iCloud account.
    I forgot my .mac password and I want to open an email message sent to my .mac email account. 
    When I attempt to log into my .mac account using Apple Mail, my password attempts are rejected by a .me mail server.
    Is there any way I can restore my access to my .mac or .me email?
    Thanks,
    William Postman

    Welcome to the Apple Community.
    Try...
    iForgot.com

  • I already have adobe digital editions on my mac pc and download books from the library to my android e-reader. Can I use the same digital editions on my ipad air, or do I need to load a different one onto my ipad?

    I already have adobe digital editions on my mac pc and download books from the library to my android e-reader. Can I use the same digital editions on my ipad air, or do I need to load a different one onto my ipad?

    Try following forum:
    Adobe Digital Editions

  • I have itunes set up on a PC with all my music, apps, etc. I want to stop using PC and move my iTunes and files to a Mac I bought and synch my iPhone with the Mac. Can I just synch iPhone with Mac iTunes and will it copy all my stuff onto Mac, or will I h

    I have itunes set up on a PC with all my music, apps, etc. I want to stop using PC and move my iTunes and files to a Mac I bought and synch my iPhone with the Mac. Can I just synch iPhone with Mac iTunes and will it copy all my stuff onto Mac, or will I have to copy files from PC onto Mac?

    Here are some of the links to get you started.
    https://discussions.apple.com/thread/3727530?start=0&tstart=0
    http://support.apple.com/kb/HT4527
    http://www.macworld.com/article/1146958/move_itunes_windows_mac.html

  • Difference between path and classpath

    Difference between path and classpath?

    PATH - set of paths there executables will be found.
    CLASSPATH - set of paths and archives there class files will be found.

  • I am a new mac user and I switch to mac due to the graphics that it brings. I do website in pc and I heard iweb is the best.NOW i heard that iweb will be discontinue. so what is the best application there for website using MAC OSX lion?

    I am a new mac user and I switch to mac due to the graphics that it brings. I do website in pc and I heard iweb is the best.NOW i heard that iweb will be discontinue. so what is the best application there for website using MAC OSX lion?

    It is now confirmed  that iWeb, and iDVD, has been discontinued by Apple. This is evidenced by the fact that new Macs are shipping with iLife 11 installed but without iWeb and iDVD.
    On June 30, 2012 MobileMe will be shutdown. However, iWeb will still continue to work but without the following:
    Features No Longer Available Once MobileMe is Discontinued:
    ◼ Password protection
    ◼ Blog and photo comments
    ◼ Blog search
    ◼ Hit counter
    ◼ MobileMe Gallery
    All of these features can be replaced with 3rd party options.
    I found that if I published my site to a folder on my hard drive and then uploaded with a 3rd party FTP client subscriptions to slideshows and the RSS feed were broken.  If I published directly from iWeb to the FPT server those two features continued to work correctly.
    There's another problem and that's with iWeb's popup slideshows.  Once the MMe servers are no longer online the popup slideshow buttons will not display their images.
    Click to view full size
    However, Roddy McKay and I have figured out a way to modify existing sites with those slideshows and iWeb itself so that those images will display as expected once MobileMe servers are gone.  How to is described in this tutorial: #26 - How to Modify iWeb So Popup Slideshows Will Work After MobileMe is Discontinued.
    It now appears that the iLife suite of applications offered on disc is now a discontinued product and the remaining supported iApps will only be available thru the App Store from now on. However, the iLife 11 boxed version that is still available at the online Apple Store (Store button at the top of the page) and those still on the shelves of retailers will include iWeb and iDVD. Those two apps were listed in small, gray text on the iLife 11 box that I bought.
    Personally, if I didn't already have a copy I would purchase one to have it for reinstallation purposes if ever needed.
    This might be of some interest to you at this time: Life After MobileMe.
    OT

  • Brand new to the Mac World and NEED SOME HELP with startup disk issues

    Hello everyone. I am a new Mac user and I purchased my mac on ebay. It's an iMac that came with tiger 10.4.11. I wanted to get a fresh start on the computer, since the person who had it before me did not erase all of his stuff. I didn't know what to do so I got a startup disk/install disk off ebay also. When I go to install it says "software cannot be installed on this computer." Before I bought the software, I had called the apple store and they said it should be fine to buy any install software to put on the computer. If I could get any help it would be appreciated. I had read previous threads that I should hold down c when I start up (didn't work) or that I should select archive or erase and install (I never got these options when I went to install).

    A warm welcome to the Discussions!
    What iMac is it? I only ask as the Retail Tiger CD/DVDs don't work on IntelMacs, only PPC, (G3, G4, G5 Macs).
    Sorry what you were told by the Apple Store, but if it's a Gray CD/DVD then it is Machine specific as Neil stated.
    Sooo, what exact iMac is it, and what does it say on the CD/DVD?

  • Problem with Class and Classpath

    Hello ME Windows Users, now before you place a wry smile on your face, I have a problem with path and classpath. Stop it, I can see you smiling!
    By visiting the the last 10 pages of the forum and reading Sun installation notes, some tooldocs and by given some answers by some nice people, I have become an expert in turning off my computer, about 10 times/hr. I still am trying to make my first cup of java.
    With the ME computer,
    I'm unable to right click on the desktop and go to properties, advanced,
    I'm unable to go go start, run, sysedit,
    I'm unable to change the ms-dos window of autoexec.bat, it just shuts down.
    Now before you tell me, I should of bought a different computer, the only place I can find to modify the path and classpath is in the environment which is in system configuration under tools. Here I have placed numerous configurations, like
    C:\java>set path=%path%;c:\j2sdk1.4.2\bin
    C:\java>set classpath=%classpath%;.;
    ;java_dir\bin where ;java_bin is c:\j2sdk1.4.2
    .; java_dir\bin; %path% where ;java_bin is c:\j2sdk1.4.2 and the list goes on.
    But, I know you are still smiling, the % signs comes up in a dialog box, saying too many, and will not convert the text to the environment to be saved when I close down for the tenth time in the last hour.
    Can someone help me before I make a real cup of coffee and accidentally drop it on the ME box.
    Have a laugh on me Mik.

    C:\java>set path=%path%;c:\j2sdk1.4.2\binGood
    But it is no good because it has to many % and a dialog box appears, saying you have too many parameters.
    Are you saying I have to shutdown again to answer your ?
    From the HELP menu-
    To confirm startup commands line by line
    Click Start, and then click Shut down.
    Click Restart, click OK, and then press and hold the CTRL key until the Windows Startup Menu appears.
    Enter the number for Step-by-step confirmation, and then press ENTER.
    For each command you want to run, press Y.
    If the command runs successfully, you are prompted with the next command.
    If the command does not run successfully, you receive an error message.
    To skip a command, press N.
    Mik

  • Mac Pro and DVI to Video Adapter

    I just received a new Mac Pro with a GeForce 7300 card and was planning to use it in part to display video on a set of TV monitors using the Apple DVI to Video Adapter. Try as I might I have not been able to get the computer to recognize a TV regardless of the DVI port and using both S-Video and RCA. I now see that in Apple's store the converter is classified as Requiring a "MacBook Pro, Mac mini or Power Mac G5 with DVI port". Not sure if there's any way around this. The adapter has worked fine in the past with both a Mac Mini and a G5 tower. If anyone knows a possible workaround or if an updated adapter is forthcoming I would appreciate the information.

    Just to be clear here: There is no way to get S-Video
    output from my $~2700 machine (with the stock
    7300gt)? Not even with (maybe forthcoming) additional
    adapters? This is pretty embarrassing. Actually I'm
    sorta angry.
    Are there any other options like DVI->VGA->S-Video
    maybe? I surely won't dump $150 into the trash just
    to have that (supposedly) noisy beast of a x1900
    screaming around here. Just for S-Video. This is
    silly.
    There are VGA to S-Video converters but they cost more than the Apple adapter. Here is one. Probable a bit fancier than you want. There are others.
    <http://www.ramelectronics.net/html/PC-TVvideoadapter.html>
    The Apple adapter is cheap because all the work is being done in the video card when it detects the adapter. The video card outputs the S-Video brightness and color, and the composite video on the DVI pins that would normally be used for analog red, green, and blue, using the A/D converters normally used for a CRT. The adapter just sends the signals to different connectors. The adapter won't do anything with a card that wasn't designed to output TV video.

  • I have just tried to connect my Mac book pro to an LG Plasma TV via an iWires Mini DisplayPort to HDMI cable. All I get on my TV is the Mac wallpaper and nothing else. I am missing something really silly, could anyone help please.

    I have just tried to connect my Mac book pro to an LG Plasma TV via an iWires Mini DisplayPort to HDMI cable. All I get on my TV is the Mac wallpaper and nothing else. I am missing something really silly, could anyone help please.

    Hi there. I also bought an iWires mini Display port to HDMI cable and have an LG LED/LCD TV. I plugged it in to my MB Pro and followed the very small writing that came in the package and got both audio and video going. You need to change the audio settings from within System Preferences on your Mac to select your TV as the audio output.
    My concern is the data latency - do you experience a delay between moving your mouse on the MBPro and the TV displaying the movement? It is only a fraction of a second, but certainly enough to be annoying, especially in a cable as expensive as the iWire.

  • Mac Mini and DVI to ADC adapter

    I have an old Apple Cinema Display with an ADC port. I have the DVI to ADC adapter, which I have been using to connect to an old Power Mac which is on its last legs. I want to replace the Power Mac with a mac mini and connect it to the display from the HDMI-DVI cable (included) to the DVI-ADC adapter, and then connect on to the Display. The Apple sales representative (after laughing for a while, which I thought was fairly insensitive) said that I won't have audio with this setup, and I will have to get a whole new display. Is this true?

    when you say "Mac flat screen LCD", do you mean this:
    http://www.ares-woo.com/christmas2005/images/pc_cine.jpg
    if it is, you might wanna try this:
    http://store.apple.com/us/product/MB570Z/A?mco=MTY3ODQ5OTY

  • I have a Power Mac G4 and i am trying to get it to work with my LCD

    I have a Power Mac G4 and i am trying to get it to work with my LCD Monitor/TV. The connection on the computer is DVI and the connection on the Monitor is DVI. The Monitor says in the manual to hook up computers using the DVI connection. When I connect the too the monitor says there is no video input. I tried changing the settings on the monitor from PC mode to DVI mode and nothing. I have also tried changing the display on the computer to a couple of different settings and nothing. Please Help?

    Hi-
    A little more info please.
    What model G4?
    What Graphics card?
    What OS?
    What model/make of monitor?
    G4AGP(450)Sawtooth, 2ghz PowerLogix, 2gbRAM, RaptorSATAATA, ATI Radeon 9800   Mac OS X (10.4.8)   Pioneer DVR-109, 23" ACD, Ratoc USB 2.0, QCam Ultra, Nikon Coolscan

Maybe you are looking for

  • Sharepoint Online Can not edit anything in Sharepoint designer as Site collection administrator

    Dear all, I am using sharepoint online and sharepoint designer 2013. Things were working fine but one day it suddenly stopped working. I have assigned site collection administrator to several accounts and I tried on different computers. I can not edi

  • Backup from Tiger to Leopard

    Hi. I've been doing a lot of reading bofore updating from Tiger (10.4.11) to Leopard (10.5.5) and I got the idea that it is a better solution to first do a backup copy and then completly clean the Mac before install Leopard. Until here, no problem. M

  • Compare previous row values for the same id and decide

    Hello , I have this sample data create table #student_academic pk_id int identity(1,1) primary key , student_id int , [year] int, [aggr_marks] float insert into #student_academic student_id , [year] , [aggr_marks] values (112,2012,55.4),(113,2012,65.

  • I need to control resultsPerPage without hardcoding the value

    I need to be able to setup the resultsPerPage parameter in the webapps module line as a variable rather than a constant. e.g. {module_webapps,ID   ,filter,itemID,notUsed,targetFrame,useBackup,resultsPerPage,hideEmptyMessage,rowLength,So rt} I have tw

  • When i insert the menu.js file the validations(javascript) is not works

    i write the following code into "menu.js" file ie. for menu bar its work finely. I write one jsp file in that i write the code for insert record with the validatations eg. check whether its number or not/ integer or not. In this jsp file i include th